Display Date and Time in Many Formats Header

Display Date and Time in Many Formats

  [Call : 201-377-9031 (US) 0207-096-0627 (UK)]          About Us : Support : Contact  : Site Map 
    Home | Products | Hosting | Services | Resources | FAQ
HomeDisplay Date and Time in Many FormatsResourcesDisplay Date and Time in Many Formats
Home Products Hosting Services Resources FAQ
Resources

Display Date and Time in Many Formats
Posted by : Amit Agarwal Total Hits : 30078

The following functions explains on how you can display a date ot time in many formats using FormatDateTime function. FormatDateTime takes two input paraemeters, a required date variable and an optional date format.

vbGeneralDate - displays a date as a short date and a time as a long time.
vbLongDate - displays a date in the long format
vbShortDate - displays a date in the short format
vbLongTime - displays a time using the long format
vbShortTime - displays a time using the 24-hour format



  
Get the Source Code.
Dim Currdate
Currdate = Now()

Response.Write "vbGeneralDate - " & FormatDateTime(Currdate, vbGeneralDate) & "<BR>"
Response.Write "vbLongDate - " & FormatDateTime(Currdate, vbLongDate) & "<BR>"
Response.Write "vbShortDate - " & FormatDateTime(Currdate, vbShortDate) & "<BR>"
Response.Write "vbLongTime - " & FormatDateTime(Currdate, vbLongTime) & "<BR>"
Response.Write "vbShortTime - " & FormatDateTime(Currdate, vbShortTime) & "<BR>"

 
Source Code






Countries where our products are used.


 Copyright © 2006 ScriptMate. Display Date and Time in Many Formats 
Password Protection :: Church Membership Software :: Membership Management Software
Membership Software :: User Management :: Classified Ads Software :: FAQ Management Software :: Free VBScript Resource
Bunk Beds :: Cribs :: Cradles Kids Furniture :: New Born Baby Furniture :: Baby Furniture