Microsoft Access VBA Date Format 1st 2nd 3rd 4th

 

sDate = Format(Date, "dddd dd") & 
Mid("thstndrdth", (DatePart("d", Date) Mod 10) * 2 + 1, 2) & " " & 
Format(Date, "mmmm yyyy")

Example - Saturday 21st August 2010

 

MonthName(3) 	would return 'March'
MonthName(3, TRUE) 	would return 'Mar'
MonthName(7, FALSE) 	would return 'July'

 

http://www.martintallett.com/st-nd-rd-th.html

http://www.techonthenet.com/excel/formulas/monthname.php

你可能感兴趣的:(Microsoft)