Datediff differences in US and Europe

jda jda at his.com
Sun Jul 1 17:53:47 CDT 2012


I store the exact date and time (in seconds). Just the day isn't sufficient for issues like syncing.

Jon



> That's what I do. Except  I make YYYY-MM-DD be the date I use everywhere, including what I store in database as it is a much easier number to work with. It sorts correctly.
> 
> 
> 
> On Sun, Jul 1, 2012 at 3:13 PM, Ruslan Zasukhin <ruslan_zasukhin at valentina-db.com> wrote:
> 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]
> 
> 
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
> 
> 
> 
> -- 
> http://www.bluewatermaritime.com
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macserve.net/pipermail/valentina/attachments/20120701/70cc03c5/attachment.html>


More information about the Valentina mailing list