Using a variable in Day Difference

Hi All

Ive really searched and cannot find anything on how to use a variable in a Day Difference block

Please help

Thanks

  1. The FormatDate method does not return an instant, but the GetMillis method expects an instant

  2. The Duration method expects instants, but the GetMillis method does not return an instant…

Read the documentation and follow the tutorial

Taifun

Yes thanks, I read it and its quite confusing.

Please can you help me and fill in the blanks. That was my best understanding

Thanks

???

Remove the GetMillis block

Taifun

i get this???

Your global variable must be an instant
You have to use the correct data types…

In your case to use the method MakeInstant directly with your date string makes more sense… but it must be in the following format:…

An instant in time specified by MM/dd/YYYY hh​:myanmar:ss or MM/dd/YYYY or hh:mm

If you want to use a date string like 2023-04-26, then you first have to convert it accordingly

Just follow the documentation and use the correct format…

Taifun