OutFront Forums
     Home    Register     Search      Help      Login    

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

Sponsors
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

 

How to find the day of the year

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP, PHP, and Database >> How to find the day of the year
Page: [1]
 
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

(in reply to dzirkelb1)
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 :)

(in reply to ou812)
Page:   [1]

All Forums >> Web Development >> ASP, PHP, and Database >> How to find the day of the year
Page: [1]
Jump to: 1





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