Joined: 04 Sep 2009
Location: United States
Online Status: Offline
Posts: 31
Topic: Formula for "Tomorrow" Posted: 13 Jan 2010 at 9:43am
I am trying to put a select in my report that chooses items with a date of today or/thru tomorrow. I want it to choose those two days whenever it is run without having to enter the dates (this report will be loaded into a different aplication). I know how to do today (currentdate) but I can't find soemthing for tomorrow and I have been unsuccessful using dateadd to add 1 day to current date. Any help would be greatly appreciated!
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Posted: 14 Jan 2010 at 6:34am
dateadd is the way that I would go, but currentdate only returns the date (no time), so adding a day would get you to midnight of the date, and if you are comparing this a datetime field in the db, you probably wouldn't get anything... With that in mind, I would try adding 2 days to currentDate which should pick all of the second date.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum