Is the DateFormat read only?

Bob Sneidar bobsneidar at iotecdigital.com
Fri Oct 30 13:25:53 EDT 2020


I have a formatDate() function (not to be confused with dateFormat) that has a few extra formats, one I call sql date for instance which is yyyy-mm-dd (and another function for time so I can produce a datetime compatible for SQL databases). 

I suppose it can be expanded for other formats, but when it comes to time zones, everything gets very complicated. Someone posted an article years ago as to why calculating current date and time in any given location is so complicated, and it has mostly to do with local standards. There are so many special cases, it really takes a centrally managed database to keep track of it all. 

Bob S


> On Oct 29, 2020, at 14:33 , Graham Samuel via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Jacque
> 
> Right as usual. I had forgotten about the internet date, if I ever knew. I suppose somewhere there is a little essay about all this but if so it is buried in the LC documentation.
> 
> The only souci with this format is that it gives the month in alpha, presumably according to the nationality of the OS. But it’s easy to get the numeric month in other ways. Still, it is just a little bit fiddly to create a full UTC date of the format:
> 
> YYYY-MM-DDThh:mm:ssTZD
> 
> Works OK now, just slightly more lines of code than I would have guessed.
> 
> Thanks (again).
> 
> Graham



More information about the use-livecode mailing list