Quote:
Originally Posted by ownedbycats
In another post, I asked about setting specific time. Now I'd like to know if possble to:
1. Take current date.
2. Subtract one day (April 23 -> April 22).
3. Set the time to 23:59 of that date.
This would be for Reading Goal setting the #lastread - I update my daily page at end of day, but sometimes forget till next morning which messes up the page-per-day count.
|
Code:
program:
date_arithmetic(re(today(), 'T.*\+', 'T00:00:00+'), '-1m')
This gets the current date and time, sets the time to midnight, then subtracts one minute from that to get 23:59 on the previous day.