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

Displaying the date in dd/mm/yy format.

Dreamweaver & Flash

Displaying the date in dd/mm/yy format.

by  Cheech  Posted    (Edited  )
asp/vbscript code

Just insert this into the head of your code.

Code:
Dim strUKDate, MYdd, MYmm, MYyy
MYdd = DatePart("d", date())
MYmm = DatePart("m", date())
MYyy = DatePart("yyyy", date())
strUKDate = (MYdd & " " & MYmm & " " & MYyy)

Then just <%=strUKDate%> wherever you need to display it.

If you wish to use the month name use the code below

Dim strUKDate, MYdd, MYmm, MYyy
MYdd = DatePart("d", date())
MYmm = MonthName(DatePart("m", date()))
MYyy = DatePart("yyyy", date())
strUKDate = (MYdd & " " & MYmm & " " & MYyy)

Then just <%=strUKDate%> wherever you need to display it.

Cheech
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