date to number
Leonardo Diogo
leonardo.silva at CPTEC.INPE.BR
Wed Nov 25 10:21:27 EST 2009
Hi eliav
I think that you can use the sublin command before the line "day
=substr(date,1,3)". I will point the position of the "hour" and the
"day" on the third line of the "q time" result.
The sintaxe is pos_hour = sublin(date,<start place of the hour
position>) and pos_day = sublin(date,<start place of the day position>)
I will be usefull if you want to store that information like an asii file.
I hope that it will be useful to you
Leonardo
= = = = = =
Quoting eliav schmulewitz <eliavs at GMAIL.COM>:
> hi
> i would like to turn a string date to a number
> what i have done is this:
>
> 'q time'
> date=subwrd(result,3)
> hour=substr(date,1,3)
> day=substr(date,4,2)
> year=substr(date,9,10)
> '!date -d 'date' +%m'
> month=result
>
> but it does not work i think it does not read becuase it is from the shell
> does anyone have an idea?
> eliav
>
More information about the gradsusr
mailing list