|
| |
|
|
dzirkelb1
Posts: 1433 Joined: 10/5/2004 From: Cedar Rapids, Iowa Status: offline
|
How to find the day of the year - 6/18/2009 9:07:06
I am looking to find the day of the year, like 2/1/2009 would return 32. I am trying to do a date diff to figure this out, but am not coming up with reasonable results...here is what I have: intDayOfYear = DateDiff("d", 12/31/2009, Date()) and it is returning 39982, which obviously isnt' correct for what I am looking for. Can someone help me fix this or offer an easier way to figure out what day of the year today's date is?
|
|
|
|
ou812
Posts: 1705 Joined: 1/5/2002 From: San Diego Status: offline
|
RE: How to find the day of the year - 6/18/2009 9:34:20
Datediff looks like it is getting confused with no quotes around the date, and you're using a future date.Try this instead: DateDiff("d","1/1/2009",date)
_____________________________
-brian Black Holes suck. EnterpriseDB: Enterprise-class relational database management system PostgreSQL: The world's most advanced open source database
|
|
|
|
dzirkelb1
Posts: 1433 Joined: 10/5/2004 From: Cedar Rapids, Iowa Status: offline
|
RE: How to find the day of the year - 6/18/2009 10:56:36
that worked, thanks :)
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|