RosettaCodeData/Task/Show-the-epoch/LotusScript/show-the-epoch.lotus
2015-11-18 06:14:39 +00:00

17 lines
504 B
Text

Sub Click(Source As Button)
'Create timestamp as of now
Dim timeStamp As NotesDateTime
Set timeStamp = New NotesDateTime ( Now )
'Assign epoch start time to variable
Dim epochTime As NotesDateTime
Set epochTime = New NotesDateTime ( "01/01/1970 00:00:00 AM GMT" ) ''' These two commands only to get epoch time.
'Calculate time difference between both dates
Dim epochSeconds As Long
epochSeconds = timeStamp.TimeDifference ( epochTime )
'Print result
Print epochSeconds
End Sub