Re: datetime functions
ChrisBurch2 wrote:
>
> Hi
>
> Phew, having difficulty keeping up.
>
> Can I take a date string, (24/05/2008), add 47 days, and get a date string
> back?
>
> Note the UK localisation!
>
Chris,
There are two skeleton functions (no code yet). format and parse. You will have
to do something like:
datetime dt
dt = d:parse(date, "%d/%m/%Y")
dt = d:add(dt, 47, DAYS)
puts(1, d:format(dt, "%d/%m/%Y")
Of course, you could create constants for the date/time format.
--
Jeremy Cowgar
http://jeremy.cowgar.com
|
Not Categorized, Please Help
|
|