Localized date time won't convert to dateItems

Matthias Rebbe matthias_livecode_150811 at m-r-d.de
Sat Jul 23 15:26:53 EDT 2016


did you try with the parameter from...

convert   tDate from …. to dateitems

where the parameter after from is the source date format.

e.g.
put the system date into tDate
convert tDate from system date to dateitems.

I remember that i had a similar problem when working with system dates which were not “english”.

Regards,

Matthias

> Am 23.07.2016 um 17:34 schrieb Roger Eller <roger.e.eller at sealedair.com>:
> 
> I have an application running on Windows 7.  Windows is localized for
> Spanish language, and resides in Mexico.  Convert doesn't work.  In their
> default format, convert VAR to dateItems returns the original unchanged VAR
> content.
> 
> This is my workaround.  Is there a better way?
> 
> put "22/07/2016 05:22 p.m." into tMEXdate
> replace "a.m" with "AM" in tMEXdate
> replace "p.m" with "PM" in tMEXdate
> set the itemDel to "/"
> put item 1 of tMEXdate into tDD
> put item 2 of tMEXdate into tMM
> put tMM into item 1 of tMEXdate
> put tDD into item 2 of tMEXdate
> -- now it is the same as in USA
> -- "07/22/2016 05:22 PM"
> convert tMEXdate to dateItems
> 
> ~Roger
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list