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

how do I format a date the way I want it

Applications

how do I format a date the way I want it

by  onpnt  Posted    (Edited  )
Dates can be the easiest thing to format. Although it being a very common question. This is simple woving the month and year to different postions. When you want a / for seperation replace the comma within the quotes.

DateToday = MonthName(Month(date())) & ", " & Day(Date()) & ", " & Year(Date())
alert DateToday 'returns mm, dd, yyyy
DateToday = Year(Date()) & ", " & MonthName(Month(date())) & ", " & Day(Date())
alert DateToday 'returns yyyy,mm,dd

Happy Programming [flip]
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top