Datediff differences in US and Europe
Ruslan Zasukhin
ruslan_zasukhin at valentina-db.com
Sun Jul 1 14:13:53 CDT 2012
On 7/1/12 6:15 PM, "jda" <jda at his.com> wrote:
HI
> Ruslan,
>
> Please read my posts again, carefully.
>
> I do NOT use Valentina date and time fields,
> I use my own fields (doubles)
Ok, but why by the way?
What reason was ?
DOUBLE is 8 bytes,
Our DATE field is 4 bytes ...
> and save the Mac date and time data.
You mean current date and time,
Yes?
> It works, and has for many years.
ok
> I've been using an SQL search that let's me get records entered after a
> relative date:
>
> datediff( now(), '01/01/1904', 'seconds')
> and it works for Engish! But the *stupid* function is language sensitive, so
>
> '01.01.1904'
>
> is required if the language is German.
>
> And God knows what it is for Russian!
Jon,
So problem is that when your app runs on German OS
your hard-coded '01/01/1904' value becomes wrong?
Well, fix is simple enough I think.
You know that exists
Vdatabase.DateTimeFormat,
Vdatabase.DateSep
Vdatabase.TimeSep
So you can on start of your app assign that
.format = kMDY
.DateSep = '/'
.TimeSep = ':'
Now these settins will be used for any OS.
And your hard-coded values will be valid
> I want a simpler way to always get what I want without worrying about the
> language.
>
> If Valentina can't do this, just tell me.
>
> Jon
> Sonny Software
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the Valentina
mailing list