© MCS Electronics, 1995-2007
Print "Second of Day " ; Lsecofday ; " converted to Sec=" ; Bsec ; " Min=" ; Bmin ; " Hour=" ; Bhour ; " (" ; Time(lsecofday) ; ")"
'Example 6: Converting Time-string to defined Clock - Bytes (Second / Minute / Hour)
Strtime = "07:33:12" Bsec = Time(strtime)
Print "Time " ; Strtime ; " converted to Sec=" ; Bsec ; " Min=" ; Bmin ; " Hour=" ; Bhour
'============================= Date
==========================================
'Example 1: Converting defined Clock - Bytes (Day / Month / Year) to Date - String
Bday = 29 : Bmonth = 4 : Byear = 12 Strdate = Date(bday)
Print "Dat values: Day=" ; Bday ; " Month=" ; Bmonth ; " Year=" ; Byear ; " converted to string " ; Strdate
'Example 2: Converting from System Day to Date - String
Wsysday = 1234
Strdate = Date(wsysday)
Print "System Day " ; Wsysday ; " is " ; Strdate
'Example 3: Converting from System Second to Date String Lsyssec = 123456789
Strdate = Date(lsyssec)
Print "System Second " ; Lsyssec ; " is " ; Strdate
'Example 4: Converting SystemDay to defined Clock - Bytes (Day / Month / Year)
Wsysday = 2000
Bday = Date(wsysday)
Print "System Day " ; Wsysday ; " converted to Day=" ; Bday ; " Month=" ; Bmonth ; " Year=" ; Byear ; " (" ; Date(wsysday) ; ")"
'Example 5: Converting Date - String to defined Clock - Bytes (Day / Month / Year)
Strdate = "04-08-31" Bday = Date(strdate)
Print "Date " ; Strdate ; " converted to Day=" ; Bday ; " Month=" ; Bmonth ; " Year=" ; Byear
'Example 6: Converting System Second to defined Clock - Bytes (Day / Month / Year)
Lsyssec = 123456789 Bday = Date(lsyssec)
Print "System Second " ; Lsyssec ; " converted to Day=" ; Bday ; " Month=" ; Bmonth ; " Year=" ; Byear ; " (" ; Date(lsyssec) ; ")"
'================ Second of Day elapsed
Lsecofday = Secofday() _hour = _hour + 1