views:

308

answers:

2

Hey, been looking for a while but I can't seem to find any info on how to handle date in classic asp.

For now, I need a way to calculate the number of days passed in the current year. I was thinking about a simple function that would take the current date, then make another date with (day = 1, month = 1, year(now)). And finally get the datediff(day) for these two. Easy enough, but I can't figure out how to do this. Help is appreciated!

+2  A: 

Perhaps this example can help you? http://www.4guysfromrolla.com/webtech/110398-1.shtml

Mr. Smith
Thanks. Read the article there and got exactly what I needed from it. :)
Zan
+2  A: 
DateDiff("d",DateSerial(Year(Now),1,1),Date)
Jonas Elfström
And thanks, I came to the same conclusion myself from that article posted above, minus the Date at the end. ;)
Zan