
Not applicable
2011-03-28
02:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Subtract a day from a set of Dates
Hello,
I am trying to display a set of dates with the day being one day earlier. example:
I want 12/12/2010, 12/13/2010, 12/14/2010
to be 12/11/2010, 12/12/2010, 12/13/2010
Can anyone help me with the code to subtract one day from a set of dates?
8,008 Views
2 Replies

Anonymous
Not applicable
2011-03-28
02:46 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Depending on the format you could add a line to your script, something like:
=Date(DateField-1) as DatePreviousDay
or use:
=Date(DateField-1)
in an expression.

Not applicable
2012-12-18
11:01 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Date(DateField-X) works fine. X being the number of days to subtract.
If it doesnt work your date might be a string so you must convert your date back to a number: num(date())
Id recommend throwing your calcualtion into a variable as well
