formatdate()
-
kiwichick
- Posts: 738
- Joined: 08 Aug 2012 04:14
- Location: Pahiatua, New Zealand
formatdate()
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.
Windows 10 Pro 22H2
Scaling 150%
Scaling 150%
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: formatdate()
text formatdate("16.08.2009"); throws an error?What does
text <date>; output then?One of my scripts helped you out? Please donate via Paypal
-
kiwichick
- Posts: 738
- Joined: 08 Aug 2012 04:14
- Location: Pahiatua, New Zealand
Re: formatdate()
Thanks highend,
Yes it does
29/10/2021 10:45:00 pmWhat doestext <date>;output then?
To see the attached files, you need to log into the forum.
Windows 10 Pro 22H2
Scaling 150%
Scaling 150%
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: formatdate()
Reading...
Your current locale does NOT use 16.08.2009 as the date format^^
date expression should be formatted either in the current locale, or in the universal ISO 8601 formatdate [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).
Your current locale does NOT use 16.08.2009 as the date format^^
One of my scripts helped you out? Please donate via Paypal
-
kiwichick
- Posts: 738
- Joined: 08 Aug 2012 04:14
- Location: Pahiatua, New Zealand
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: formatdate()
As long as you don't think that
16/08/2009 would be correct...One of my scripts helped you out? Please donate via Paypal
-
kiwichick
- Posts: 738
- Joined: 08 Aug 2012 04:14
- Location: Pahiatua, New Zealand
Re: formatdate()
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");Windows 10 Pro 22H2
Scaling 150%
Scaling 150%
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: formatdate()
I meant full (because it's missing a time component - which can be left out if not required), not correct
One of my scripts helped you out? Please donate via Paypal
-
kiwichick
- Posts: 738
- Joined: 08 Aug 2012 04:14
- Location: Pahiatua, New Zealand
Re: formatdate()
Gotcha, yes I see what you mean now
Windows 10 Pro 22H2
Scaling 150%
Scaling 150%
XYplorer Beta Club