Page 1 of 1

REXX Date(seconds)

Posted: Thu Jan 08, 2026 6:42 am
by dgconder
My understanding is the seconds argument to the date function should return the number of seconds in the Amiga Epoch from 1978. Instead it returns yyyymmdd Which is still useful but not what I was looking for. Not sure if the is a dos.library thing or a AREXX thing. Or some kind of user error on my part.

Re: REXX Date(seconds)

Posted: Thu Jan 08, 2026 11:42 am
by nbache
No, your understanding is wrong. There's no "seconds" argument to the date() function, and no ways to make date() return a value in seconds.

See the description here: https://wiki.amigaos.net/wiki/AmigaOS_M ... ons#DATE()

Edit: PS. You can probably get what you're after with date(i) and multiplying the result by the number of seconds in a day, like this:

$ rx "numeric digits 14; say date(i) * 24 * 60 * 60"
1515369600

If you need it often, you can always define your own function to do it.

Best regards,

Niels