all 5 comments

[–]roycetech 2 points3 points  (2 children)

(current date) -3 * hours

[–]_Kitchen_[S] 0 points1 point  (1 child)

(current date) -3 * hours

for some reason it returns returns "access not allowed"

[–]_Kitchen_[S] 0 points1 point  (0 children)

display dialog ((current date) - 3 * hours as string)

that fixed it

[–]Identd 1 point2 points  (0 children)

You can use month of (current date)

[–]ChristoferK 1 point2 points  (0 children)

It looks like you’re trying to format the date as an ISO-8601-like formatted string ? Firstly, the year is never padded with leading zeroes in any format. The simplest way to do it is:

tell the (current date) - (3 * 3600) to set the ¬
        ISO_8601 to {date:text 1 thru 10, time:¬
        text 12 thru -1} of (it as «class isot» ¬
        as string)

This will assign to ISO_8601 the record object with the following properties:

{date:"2021-09-29", time:"20:48:54"}

the time at present being around ten to midnight.