Re: [4DTidbits Blog] Epoch & Unix Timestamp Conversion

2017-03-27 Thread Arnaud de Montard via 4D_Tech
> Le 26 mars 2017 à 22:14, Bruno LEGAY via 4D_Tech <4d_tech@lists.4d.com> a > écrit : > >> [...] >> >> $0:=($1-Date("01/01/1970"))*(60*60*24)+($2*1)+$vl_Unix_Timestamp_Offset > > Avoid using Date() to convert a string to a date because this will rely on > the date being formatted according

Re: [4DTidbits Blog] Epoch & Unix Timestamp Conversion

2017-03-26 Thread Keisuke Miyako via 4D_Tech
you could also... C_LONGINT($yearPosition;$monthPosition;$dayPosition) C_TEXT($digitPosition) GET SYSTEM FORMAT(Short date year position;$digitPosition) $yearPosition:=Num($digitPosition) GET SYSTEM FORMAT(Short date month position;$digitPosition) $monthPosition:=Num($digitPosition) GET SYSTEM

Re: [4DTidbits Blog] Epoch & Unix Timestamp Conversion

2017-03-26 Thread Herr Alexander Heintz via 4D_Tech
Am 26.03.2017 um 22:14 schrieb Bruno LEGAY via 4D_Tech <4d_tech@lists.4d.com>: > > Avoid using Date() to convert a string to a date because this will rely on > the date being formatted according to you current system setting... Yes and no… Using DATE() with an ISO Timestring

Re: [4DTidbits Blog] Epoch & Unix Timestamp Conversion

2017-03-26 Thread Bruno LEGAY via 4D_Tech
Hi, > I worked out an Date and Time to Epoch conversion recently. I’d be interested > if anyone can find a case where it doesn’t work: > > > > C_DATE($1) > C_TIME($2) > C_LONGINT($0) > > C_DATE($vd_Current) > C_TIME($vh_Current) > C_TIME($vh_ISO_GMT) > C_LONGINT($vl_Unix_Timestamp_Offset) >

Re: [4DTidbits Blog] Epoch & Unix Timestamp Conversion

2017-03-24 Thread Arnaud de Montard via 4D_Tech
> Le 24 mars 2017 à 13:27, Herr Alexander Heintz via 4D_Tech > <4d_tech@lists.4d.com> a écrit : > > Hi Y'all, > > just a short one for the weekend, maybe someone can use it: > > http://blog.heintz.net/a-quick-one-epoch-unix-timestamp-conversion/ Nice, thanks! -- Arnaud de Montard

[4DTidbits Blog] Epoch & Unix Timestamp Conversion

2017-03-24 Thread Herr Alexander Heintz via 4D_Tech
Hi Y'all, just a short one for the weekend, maybe someone can use it: http://blog.heintz.net/a-quick-one-epoch-unix-timestamp-conversion/ Cheers Alex ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html