Convert date
Alex Tweedly
alex at tweedly.net
Fri Jul 14 14:39:41 EDT 2023
On 14/07/2023 16:34, Bob Sneidar via use-livecode wrote:
> CASE "sql date"
> put item 1 of theDate & "-" & \
> format("%02d",item 2 of theDate) & "-" & \
> format("%02d",item 3 of theDate) into theDate
> break
Why not just
put format("%s-%02d-%02d", item 1 of theDate, item 2 of theDate), \
item 3 of theDate) into theDate
Alex.
btw - you forgot the if/switch check for
"if in the USA" vs "if in the UK" :-) :-)
More information about the use-livecode
mailing list