Codefixer - ASP tutorials, resources and software
ASP.NET 3.5/2.0 Hosting – Click Here
Home   Articles   Resources   ASP directory   ASP Tutorials   Code Snippets   ASP Applications   Forum
Friday 9 May
MembersPro PayPal - ASP Membership software

DiscountASP.NET – ASP.NET 3.5/2.0 Hosting


ASP Partner ASP Partner ASP Partner more partners...

Change Date Form DDMMYYYY to MMDDYYYY

A simple function to display the dates in MM/DD/YYYY format rather than in DD/MM/YYYY format.

<%
Function FormatDate(thedate)
Dim myDay
Dim myMonth
Dim myYear

myDay = Day(thedate)
If Len(myDay)=1 Then myDay="0" & myDay

myMonth = Month(thedate)
If Len(myMonth)=1 Then myMonth="0" & myMonth

myYear = Year(thedate)

FormatDate = myMonth & "/" & myDay & "/" & myYear
End Function

Dim dDate
dDate=Date()
Response.write FormatDate(dDate)
%>





If you have any code snippets to share with full credit given then send an email to Codesnippets - You'll receive full credit and a link back to your site.

ASP.NET 3.5/2.0 Web Hosting: 3 Months FREE – Click Here!




About | Contact | Advertise | Feedback | Hire Us | Link

Site developed by Michael Wall - Web Design Belfast N.Ireland.
Copyright © 2000-2008. All rights reserved.

Do you intend to move to ASP.NET or have you already?
Yes will do
Have done
ASP does fine
Not a priority


Directory Software