There are a few ways to specify time and date on your page. The following codes show you some choices to make.
Simple Date and Time calls.
To get a date with time, you can use <% Now () %>
8/17/2018 12:04:48 AM
You can retrive date only by using <% =Date() %>
This command returns only date
on the server's side.
In the same way, guess what <% =Time () %> will return on server side.
If you thought
xx:xx:xx AM/PM, then you are right.
Using variables to pass date.
<% dim mydate
mydate = Date()
Response.write ""& mydate & ""
This variable returns
which is the same as using the now().
The same principle can be used to return time.
Formating your time.
You can use the following formatting structures on your page.
<% =FormatDateTime(Date, X) %>, X being numbers 1 and 2
todays date and time in alphabets.[
Friday, August 17, 2018
2 being [
as regular date.
I hope you found this interesting enough. If you have any suggestions, please post it to the Tech Forum or send us your Feedback