For one user in Asia (unfortunately one of the most important ;-( ), the error is :
Formula Error (Form = “Appointment” & CalendarDateTime >=[01-Jan-06]")
For the other users, the formula is equal to : (Form = “Appointment” & CalendarDateTime >=[01/01/06]")
I think that the search doesn’t like the format Month in letter instead of number !!
1/ I would like to know which local setting can format the date like this “dd-MMM-yy”, because I check his regional options (set to English (United States)) and the field short date is formatted like taht :“dd/MM/YY”.
I want first to reproduce the issue in order to solve it.
I try to change my regional options and I try to not use OS settings but Notes settings. Nothing.
2/ I wonder why the error raises because DateNumber creates a date object (through the variant object) and not a string.
Intresting !!! , the common local setting for date and time is :- for windows , > start control planel > regional settings >> time >> date , change to format DD/MM/YY. if these settings are ok , still ,error, I am not sure ,
You’re using the default conversion of date to string, which depends on the user’s settings. You might want to look at the Format function. You might also consider using a NotesDateTime object, which has its own date-to-text rules. Also, there’s the @Date function, which lets you provide the date in a format completely independent of the user’s preferences. I.e.:
Tx Andre for the response.But the return value of DateNumber is a date (variant) object and not a string. That’s the reason why I don’t really understand.
But anyway, with @Date it works perfectly. Tx again for the clue (it’s the second time that you help me)
Sure, Datenumber returns a date/time variant. But if you take that variant and concatenate it to a string, the result is not some weird hybrid value that’s part string, part date/time. A string plus some other value gives a string, so the date/time is converted to characters and those are added to the string. The Format function would give you control over how that date-to-string conversion is done – if you don’t use Format, a default formatting is used.