How to resolve the algorithm Show the epoch step by step in the LotusScript programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Show the epoch step by step in the LotusScript programming language

Table of Contents

Problem Statement

Choose popular date libraries used by your language and show the   epoch   those libraries use. A demonstration is preferable   (e.g. setting the internal representation of the date to 0 ms/ns/etc.,   or another way that will still show the epoch even if it is changed behind the scenes by the implementers),   but text from (with links to) documentation is also acceptable where a demonstration is impossible/impractical. For consistency's sake, show the date in UTC time where possible.

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Show the epoch step by step in the LotusScript programming language

Source code in the lotusscript programming language

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

  

You may also check:How to resolve the algorithm Percentage difference between images step by step in the Racket programming language
You may also check:How to resolve the algorithm Topological sort step by step in the M2000 Interpreter programming language
You may also check:How to resolve the algorithm Bulls and cows step by step in the Sidef programming language
You may also check:How to resolve the algorithm McNuggets problem step by step in the C programming language
You may also check:How to resolve the algorithm Call a foreign-language function step by step in the Phix programming language