If you use the LotusScript NotesDominoQuery class to set the date and time in a DQL query, you must type an ISO8601-compliant format.
The date and time that we usually see in the document properties and view columns are the values converted to local time, and the time zone value may not be displayed there.
The ISO format is redundant such as time zone and milliseconds, and the separator is a hyphen instead of a slash. It is confusing because it is different from the date and time format that we are used to in LotusScript.
In the future, when using AppDev Pack to work with Domino and other systems, there will be more opportunities to exchange ISO format dates and times.
There are two ideas for converting to ISO8601-compliant dates and times:
1. Type “ISO Date Time” in the second element of the format function
Print Format(Now, “ISO Date Time”) ‘ Output: 2019-09-22T02:02:00.00+0900
2. Extending the NotesDateTime class that allows you to input and output values in ISO8601-compliant format
Dim ndt As New NotesDateTime(Now)
Print ndt.ISOTime ‘Output: 2019-09-22T02:02:00.00+0900
Dim ndt As New NotesDateTime(“2019-09-22T02:02:00.00+0900”)