Asp > Code Snippets
Find out part of a date using the DatePart function
Find out part of a date using the DatePart function <% 'DatePart examples 'we will be using the Now() function for the date in all examples 'we will display the week number Response.Write DatePart("ww" , Now) & "
" 'display the weekday Response.Write DatePart("w" , Now) & "
" 'display the hour Response.Write DatePart("h" , Now) & "
" 'display the day Response.Write DatePart("d" , Now) & "
" %>
Asp Codes
ActiveX
ADO
Array
Code Snippets
Components
Data Access
Date Time
Files
Graphics
HTML Formatting
Mathematics
Miscellaneous
Sessions
SQL
Strings
Techniques
XML