Page 1 of 1
formatdate()
Posted: 29 Oct 2021 10:27
by kiwichick
Hi, I've just been checking out the examples in the help file but none of them work for me when the date is provided. They just throw an "Invalid date" error. I'm not aware of anything unusual in my system's date/time setup. It's the same as the dd.mm.yyyy format used in the examples.
Re: formatdate()
Posted: 29 Oct 2021 10:34
by highend
text formatdate("16.08.2009"); throws an error?
What does text <date>; output then?
Re: formatdate()
Posted: 29 Oct 2021 11:46
by kiwichick
Thanks highend,
highend wrote: ↑29 Oct 2021 10:34
text formatdate("16.08.2009"); throws an error?
Yes it does
2021-10-29_224441.png
What does text <date>; output then?
29/10/2021 10:45:00 pm
Re: formatdate()
Posted: 29 Oct 2021 11:48
by highend
Reading...
date [optional] Date expression to be formatted.
Defaults to now.
The date expression should be formatted either in the current locale, or in the universal ISO 8601 format (YYYY-MM-DD hh:nn:ss).
date expression should be formatted either in the current locale, or in the universal ISO 8601 format
Your current locale does NOT use 16.08.2009 as the date format^^
Re: formatdate()
Posted: 29 Oct 2021 11:50
by kiwichick
Ah I see now, I need to use "/" instead of "."
Re: formatdate()
Posted: 29 Oct 2021 11:51
by highend
As long as you don't think that 16/08/2009 would be correct...
Re: formatdate()
Posted: 29 Oct 2021 11:54
by kiwichick
highend wrote: ↑29 Oct 2021 11:51
As long as you don't think that
16/08/2009 would be correct...
Sorry? I tried using that and it worked fine, throwing no errors. The following works as expected:
Code: Select all
text formatdate("16/08/2009", "Zodiac");
Or do you mean something else?
Re: formatdate()
Posted: 29 Oct 2021 11:59
by highend
I meant full (because it's missing a time component - which can be left out if not required), not correct
Re: formatdate()
Posted: 29 Oct 2021 12:01
by kiwichick
highend wrote: ↑29 Oct 2021 11:59
I meant full (because it's missing a time component - which can be left out if not required), not correct
Gotcha, yes I see what you mean now

Thanks for your help.