sort cards dateTime by field "day" dont works

klaus at major.on-rev.com klaus at major.on-rev.com
Mon May 11 06:45:02 EDT 2009


Hi Reinhold,

> Hi!
>
> I have a stack "work" with 14 cards. Each has a field "day".
> I create a new card with the script:
>
>   create cd
>   put the short system date into fld "day"
>
> Then I want to sort the card by field "day" with the script
>
>   sort cds of stack "work" dateTime by fld "day"
>
> But I failed. My cards are orderd in this way (content of field  
> "day"):
>
> 11.05.09
> 07.05.09
> 21.01.09
> 22.01.09
> ...
> 30.01.09
> 01.02.09
> 05.05.09
>
> What is my mistake?

The engine is english, so you have to tell her that you are not :-D

...
## Force the engine to use your (local german) format for your  
"dateitem" sort:
   set the usesystemdate to true
   sort cds of stack "work" dateTime by fld "day"
...

Should to the trick.

> Thanks
> Reinhold

Best

Klaus

--
Klaus Major
http://www.major.on-rev.com
klaus at major.on-rev.com






More information about the use-livecode mailing list