New date format: YYYY-MM-DD

Alex Tweedly alex at tweedly.net
Fri Oct 14 18:14:47 EDT 2005


Sivakatirswami wrote:

> Anyone want to vote for a new standard date format?
>
> YYYY-MM-DD
>
> In fact I believe the above is some standard now...
>
ISO 8601

>  I find myself more and more encountering this as input from systems  
> both of my own creation and from others...
>
> Now you have to do a little dance to get that into a convertable  
> string...or am I missing something
> input: e.g.
>
> 06/04/13 tab someData tab SomeMoreData etc
>
> set the itemdel to tab
> put item 1 of line 1 into tDate
> set the itemdel to "/"
> put "/" &  item 1 of tDate after tDate
> delete item 1 of tDate
> set the itemdel to tab
>
It's "fixed format" isn't it (in this case, YY/MM/DD), so could you just do

put line 1 into tLine
put char 4 to 8 of tLine & "/" & char 1 to 2 of tLine into item 1 of tLine


-- 
Alex Tweedly       http://www.tweedly.net



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.14/131 - Release Date: 12/10/2005




More information about the use-livecode mailing list