Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date set!!!

Status
Not open for further replies.

thegiraffe

Programmer
Mar 8, 2002
49
IE
Is there a simple way to set the year in a date using ASP.

I have a list of setup dates for each of our records, yet i want to refer to them as a month in the last 9 months.

I have done this so whether the date was 12/08/1999 or 15/08/2001 they all come on the same list (easy)

I also want to show the dates along with the record ie. record name 12/08/1999, but i want to set the year easily to a personally defined year.

I know i can do this by splitting the date into day month & year then put them back together with extra clauses such as if len(record) = 1 then put a 0 at the start and all that,
but is there a simple function, like the dateadd function is used for adding parts of dates, is there a type of setdate function?

Cheers Dave

Theres nothing worse than an idea when its the only one we have!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top