Is the DateFormat read only?
livfoss at mac.com
Thu Oct 29 04:29:31 EDT 2020
Thanks Tore - I had forgotten the existence of dateItems. That of course will do the trick. BTW I was trying to create dates in standard UTC format, and now I can.
> On 28 Oct 2020, at 23:18, Tore Nilsen via use-livecode <use-livecode at lists.runrev.com> wrote:
> You can convert any given date to dateItems. Then you can use dateItems to present the date in any format you like. A date converted to dateItems will give you the following list of items:
> the year
> the month number
> the day of the month
> the hour in 24-hour time
> the minute
> the second
> the numeric day of the week where Sunday is day 1, Monday is day 2, and so forth
> All according to the Dictionary.
> To be sure that any valid date format is recognized as a date when you read in the date you will like to convert, it is best to ask for the system date or set the useSystemDate to true, as this will make all valid date formats convert to dateItems.
> Best regards
> Tore Nilsen
>> 28. okt. 2020 kl. 22:58 skrev Graham Samuel via use-livecode <use-livecode at lists.runrev.com>:
>> A quick test seems to show that the DateFormat can’t be changed by a ‘set’ command.
>> How then can I force a date to be in a given format? I’m really thinking of the difference between US and European dates, i.e
>> d/m/y versus m/d/y
>> Obviously for some types of use, an LC program should be able to force the format for consistency’s sake, regardless of where in the world it’s being run.
>> Can it be done?
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode