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)
$vd_Current:=Current date
$vh_Current:=Current time
$vh_ISO_GMT:=Time(Substring(String($vd_Current;ISO date GMT;$vh_Current);12;8))
$vl_Unix_Timestamp_Offset:=($vh_ISO_GMT-$vh_Current)*1
$0:=($1-Date("01/01/1970"))*(60*60*24)+($2*1)+$vl_Unix_Timestamp_Offset
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************