Posted By

savageideas on 08/21/06


Tagged

date ASP


Versions (?)

Who likes this?

10 people have marked this snippet as a favorite

christessmer
krisdb
gafsveno
stefo
nelda751
ckayra
asifrizvigmailcom
Fogh
britevents
wizard04


Date Options


 / Published in: ASP
 

URL: http://www.savageideas.com/aspdate.asp

  1. <%
  2. 'Date (1/1/2000)
  3. Response.Write FormatDateTime(Date(),0)
  4.  
  5. 'Date/Time (1/1/2000 12:00:00 AM)
  6. Response.Write FormatDateTime(Now(),0)
  7.  
  8. 'Day of Week/Date (Saturday, January 1, 2000)
  9. Response.Write FormatDateTime(Date(),1)
  10.  
  11. 'Time (12:00:00 AM)
  12. Response.Write FormatDateTime(Now(),3)
  13.  
  14. 'Time (12:00)
  15. Response.Write FormatDateTime(Now(),4)
  16.  
  17. 'Year (2000)
  18. Response.Write Year(Now())
  19.  
  20. 'Month (1 - 12)
  21. Response.Write Month(Now())
  22.  
  23. 'Day (1 - 31)
  24. Response.Write Day(Now())
  25.  
  26. 'Day of Week (1 - 7)
  27. Response.Write Weekday(Now())
  28.  
  29. 'Day of Week (Sunday - Saturday)
  30. Response.Write WeekDayName(Weekday(Now()))
  31.  
  32. 'Month (January - December)
  33. Response.Write MonthName(Month(Now()))
  34. %>

Report this snippet  

You need to login to post a comment.