Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
dtTime = CTOT("2000-10-24T13:30:00")
SET SYSFORMATS ON
cTime = "17:35:05"
SET HOURS TO 12
cTime12 = TTOC(CTOT(DTOC(DATE())+" "+cTime),2)
? cTime+"->"+cTime12
? 'H:'+GetWordNum(cTime12,1,":")
? 'M:'+GetWordNum(cTime12,2,":")
? 'S:'+GetWordNum(cTime12,3,": ")
? 'AM/PM:'+GetWordNum(cTime12,2," ")
? '----'
cTime = "03:45:10pm"
SET HOURS TO 24
cTime24 = TTOC(CTOT(DTOC(DATE())+" "+cTime),2)
? cTime+"->"+cTime24
? 'H:'+GetWordNum(cTime24,1,":")
? 'M:'+GetWordNum(cTime24,2,":")
? 'S:'+GetWordNum(cTime24,3,":")
Olaf said:if you SET HOURS TO 25, you'll have one extra hour every day to implement datetime usage into your software, until you set it back to 24.
Olaf said:By the way, if you SET HOURS TO 25, you'll have one extra hour every day to implement datetime usage into your software, until you set it back to 24.
Local ltDateTime
ltDatetime = DateTime() && set a variable to "now"
SET HOURS TO 24
? "In 24h format:",ltDatetime
SET HOURS TO 12
? "In am/pm format:", ltDatetime
SET SYSFORMATS ON
? "However Users have set up Windows:", ltDatetime
Local ldDate1, ldDate2, ltDateTime1, ltDateTime2
ldDate1 = DATE()
ldDate2 = ldDate1 + 2*7 && date in two weeks
ltDateTime1 = DATETIME()
ltDateTime2 = ltDateTime1 + 5*60 && Datetime in one minute
? ldDate1, ldDate2, "difference:", ldDate2-ldDate1, ", that's", (ldDate2-ldDate1)/7, "weeks"
? ltDateTime1, ltDateTime1, "difference:", ltDateTime2-ltDateTime1, ", that's", (ltDateTime2-ltDateTime1)/60, "minutes"
? "time difference in HH:MM:SS format (not counting days):", TTOC(DTOT(Date())+(ltDateTime2-ltDateTime1),2)
SET MARK TO "."
? DATE(), "in format 99.99.9999"
? CTOD("03/03/2017"), "converted from format 99/99/9999, even though current format is 99.99.9999"
SET MARK TO "/"
? DATE(), "in format 99/99/9999"
? CTOD("03.03.2017"), "converted from format 99.99.9999, even though current format is 99/99/9999"
CASE PARA() > 1
WAIT WINDOW 'Invalid No. of Parameters!' NOWA
IF TYPE('TIME') = 'N'
OLDTIME = TIME()
withsecs = .T.
IF TYPE('TIME') # 'C'
WAIT WINDOW 'Invalid Data Type!' NOWA
RETURN ""
TRY
convertedtime = mytime(this.value)
CATCH TO loException
WAIT WINDOW loException.Message
ENDTRY