0

Time formatting

I'm trying to use the Format function on time values, but the results are adding 7 hours. For example:

format(time(4.13,0), "hh:mm:ss") should result in 04:07:48, instead I get 11:07:48. Am I doing something wrong?

4 replies

null
    • Leonid_Semik
    • 6 yrs ago
    • Reported - view

    "format" always needs datetime as argument. try this:

    ---

    format(datetime(date(2018, 4, 24), time(4.13, 0)), "hh:mm:ss")

    ---

    Regards

    Leo

    • michaeltoc
    • 6 yrs ago
    • Reported - view

    Thank you. Not what I was hoping for, but I can always put a "dummy" date.

    • Leonid_Semik
    • 6 yrs ago
    • Reported - view

    exactly :-)

    • Leonid_Semik
    • 6 yrs ago
    • Reported - view

    you can also use the today():

    ---

    format(datetime(today(), time(4.13, 0)), "hh:mm:ss")

    ---

Content aside

  • 6 yrs agoLast active
  • 4Replies
  • 2857Views