> 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
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
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
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)
>
> 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
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
6 matches
Mail list logo