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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

year, month, day of current date

Status
Not open for further replies.

sand133

Programmer
Jun 26, 2004
103
GB
Hi, does anyone know how I can achieve the following in c# as a string...

(1) The current year
(2) The current month
(3) The current Day

in the following format

20080422

im having problem with the 04 bit, DateTime.Now.Month.ToString() returns 4 not 04.

thanks
 
does anyone know how do it in SQL, thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top