TIME: current time and date, convert times and dates, calendar functions (H)

⇒Home ⇒Contents ⇒more on Programming

Optional keywords:
Day Excel Gregorian Hour MInute MOnth MSec Sec TO WeekDay Year YYYYMMDD
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
1...12

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
D=1, MO=1, Y=0 ... D=31, MO=12, Y=9999

©2000-2010 Georg Petrich, HicEst Instant Prototype Computing.
All rights reserved.
Impressum