Time() date format without name of month
Posted: Tue Apr 05, 2016 9:34 am
For a logging purpose I needed the current date/time. The present time() function unfortunately displays the month as a 3 letter string. This makes it unusable for sorting. To solve this I created an ugly solution that does the job:
let maanden = "-01-:Jan-02-:Feb-03-:Mar-04-:Apr-05-:May-06-:Jun-07-:Jul-08-:Aug-09-:Sep-10-:Oct-11-:Nov-12-:Dec"
Let TimeNow = time(YEAR) & mid(maanden,instr(maanden,":" & time(MONTH))-4,4) & time(DATE) & "T" & time(TIME)
TimeNow contains the data now like: "2016-04-05T13:50:32" instead of "Tue Apr 05 13:50:32 2016".
and contains no spaces so perfect for use in web functions like wget.
let maanden = "-01-:Jan-02-:Feb-03-:Mar-04-:Apr-05-:May-06-:Jun-07-:Jul-08-:Aug-09-:Sep-10-:Oct-11-:Nov-12-:Dec"
Let TimeNow = time(YEAR) & mid(maanden,instr(maanden,":" & time(MONTH))-4,4) & time(DATE) & "T" & time(TIME)
TimeNow contains the data now like: "2016-04-05T13:50:32" instead of "Tue Apr 05 13:50:32 2016".
and contains no spaces so perfect for use in web functions like wget.