How to get date difference. Getting error in the assign for implict conversion of long to int


Need help getting date diff in days. as input date are in DD.MM.YYYY format.

Hi @AJ_Ask ,

Could you maybe try using CInt() for the whole Expression present in the Value to Save property and check ?

Something like below :
image

Hi @AJ_Ask

Assign activity

Int64 Varible type = DateDiff(DateInterval.Day,DateTime.ParseExact("22.12.2023","dd.MM.yyyy",System.Globalization.CultureInfo.InvariantCulture),DateTime.Now)

1 Like

Hi @AJ_Ask

Strinput="10.01.2023"
int_Days= DateDiff(DateInterval.Day, DateTime.ParseExact(Strinput.ToString, "dd.MM.yyyy", System.Globalization.CultureInfo.InvariantCulture),DateTime.Now)

Note: Strinput is of DataType System.String. int_Days is of DataType System.Int64

Refer the below Image for Better understanding.

Hope it helps!!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.