Datediff differences in US and Europe

jda jda at his.com
Thu Jun 28 07:47:50 CDT 2012


>>>      dateAdded > datediff( now(), '01/01/1904 00:00:00',  
>>> 'second' ) - (14 * 24 * 60 * 60)
>>


>> Hi Ivan,
>>
>> But that's not the problem. It works just fine form my purposes  
>> (local time). The problem is the format for the date parameter:
>>
>>      01/01/1904
>>
>> works if the system language (international setting) is set to  
>> English.
>>
>> It fails if the language is set to German. I thought
>>
>>      01-01-1904
>>
>> would work, but the search -> no results (there should be many when  
>> the language is German (or English).
>>
>> This is all on the same Mac in one time zone, there there should be  
>> no issues with now().
>>
>
>
> Hi Jon,
>
> Actually, it is not related to the language - it is only related to  
> the date-time format property.
> And so, if user can set any format himself you can not hardcoded  
> date literals in your queries.
>

Thanks. It would help if I knew what the possibilities are, though. I  
can document this for my users. For example, what would you use for  
such a query in Ukraine? What about a romance language or other  
European languages? There can't be too many variations.

Ruslan had suggested

01-01-1904

but that doesn't work. Or do I also have to put the parameter 'second'  
in the language selected by the user?

Jon



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macserve.net/pipermail/valentina/attachments/20120628/1a7bcd4a/attachment.html>


More information about the Valentina mailing list