Hi,
I hope someone can help with this query.
I have two date fields on a form,DateSubmitted and DateOfIssue.
I need to count the number of dates between these two fields.
the problem is one of these, DateofIssue, is a text field.
@If( DateofIssue = “”; “Still Open”;@Abs(@Integer((DateSubmitted - @TextToTime(DateofIssue) / (60 * 60 * 24)))))
I get an error message when I use the above code. Is there any solution to this?
Thanks,
Morgan
Subject: Date comparison with different data types
Hi,
you have to convert the strings to date with @texttotime,
but i would do this in Script.
Have a look for TimeDifference in the designer help.
Its very easy to coding:
difference& = notesDateTime.TimeDifference( notesDateTime )
regards Bernhard
Subject: RE: Date comparison with different data types
@texttotime is great IF it you have an enforced company standard for date/time format.
Otherwise you may still get an error if someone has entered a date in dd/mm/yy format and you’re machine is set to yyyy-mm-dd
Stan Rogers recently posted a neat little rountine to figure out someones date format that could be useful ( )
I guess that’s probably not going to help if you’re looking at someone else’s date format.
But I liked it, so I’m plugging it!
Good Work Stan.