Timestamp2Time & now2Timestamp
Posted: Thu Jul 17, 2003 11:47 am
Code updated for 5.20+
@Fred: You should fix the AddDate() Function
Code: Select all
;
; by Pille, 15.07.2003
;
Procedure.s Timestamp2Time(stamp.l)
;Time = Timestamp2Time(1234567890)
tStart.l = Date(1970,01,01,00,00,00)
ProcedureReturn FormatDate("%dd.%mm.%yyyy %hh:%ii:%ss", tStart+stamp)
EndProcedure
Procedure.l now2Timestamp()
;Timestamp.l = now2Timestamp()
tStart.l = Date(1970,01,01,00,00,00)
ProcedureReturn tStart + Date()
EndProcedure
Debug Timestamp2Time(0)
Debug Timestamp2Time(1234567890)
Debug now2Timestamp()
Debug Timestamp2Time(now2Timestamp())