Rich S Posted December 10, 2011 Posted December 10, 2011 Happy holidays, everybody: I "get" that when dealing with timestamps you need to add time in seconds to denote a future time or date, e.g., to add a day to a timestamp the calc would be: Timestamp + 86400 ...since 60 (seconds) x 60 (minutes) x 24 (hours) = 1 day But, how do you add a month since they can be from 28 days to 31 days? In my typical unwieldy fashion, would I create a Custom Function requiring multiple IF/CASE statements where "If it's January add 31 days; February, 28 days (except for leap years)..." etc.? I'm sure there's a _much_ simpler way of coding the calculation, I'm just not seeing it. TIA for your help!
comment Posted December 10, 2011 Posted December 10, 2011 (edited) Try = Timestamp ( Date ( Month ( timestamp ) + 1 ; Day ( timestamp ) ; Year ( timestamp ) ) ; timestamp ) Edited December 10, 2011 by comment
Rich S Posted December 11, 2011 Author Posted December 11, 2011 Brilliant, as usual. Thanks...and congrats on reaching 20,000 posts!
Recommended Posts
This topic is 4789 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now