This is part of the HicEst documentation

TIME and Date: Set and Convert. Calendar Functions

Get current time, CPUtime, date, day of the week. Format can be Excel, Gregorian, sec, min, hour, day, month, year, century, YYYYMMDDHHmmSS.sss.

⇾Home ⇾Contents ⇾more Programming ⇾ Examples

⇾display_elapsed_cpu_times ⇾measure_cpu_time

Optional keywords:
(Syntax of optional keywords)
Day Excel Gregorian Hour MInute MOnth MSec Sec TO WeekDay YYYYMMDD Year
options type description range
Year NUM year, e.g. 2008 ---
MOnth NUM month
  • TIME(TO, MOnth=m, Day=d) ! get current numeric month and day
Tip: Convert month number mm to its name
  • xyz = CHAR(mm, 12, "JanFebMarAprMayJunJulAugSepOctNovDec")
  • ! xyz is set to Mar
Day NUM day of the month 1...31
Hour NUM hour 0...23
MInute NUM minute 0...59
Sec NUM seconds 0...59
MSec NUM milliseconds 0...999
WeekDay NUM output only: numeric day of the week, Monday == 1 1...7
TXT output only: string day of the week "Monday", "Tuesday", ... Mon...Sun
Excel NUM day number after Dec 31, 1899 (Excel day 1)
  • TIME(Day=6, MOnth=7, Year=2009, TO, Excel=x) ! x set to 40000
  • WRITE(Text=text, Format="UWWW CCYY/MM/DD") 40000 ! text set to Mon 2009/07/06
Gregorian NUM Gregorian day number
  • TIME(Day=15, MOnth=10, Year=1582, TO, Gregorian=daynr, WeekDay=i, Excel=x) ! daynr=2299161; i=5; x=-115858;
The Gregorian calendar is the de facto international standard, decreed by Gregory XIII on Fri, 15 Oct 1582.
YYYYMMDD NUM 8 pre-decimal digits YYYYMMDD plus fractionalday
TXT ≤18 characters date and time YYYYMMDDhhmmss.msec
  • TIME(YYYYMMDD=19991231.375+7.5/60/24, TO, YYYYMMDD=text, YYYYMMDD=y)
  • ! results in text = "19991231090730.000"
  • ! and y = 19991231.38
YYYY=0....9999, MM=1...12, DD=1...31, hh=0...23, mm=0...59, ss=0...59, msec=0...999

Support HicEst   ⇾ Impressum
©2000-2019 Georg Petrich, HicEst Instant Prototype Computing. All rights reserved.