Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HOW TO GET DATE AND TIME?

Status
Not open for further replies.

alexfusion

Programmer
Feb 5, 2001
94
AR
Hello everybody:
This is a simple question:
I would like how to get the date and time from the system so I can show it to an intranet user.
Besides I have to enter date and time into the a table record as a field of the record.
Many thanks!

alexfusion

mixale@hotmail.com
 


now()

has todays date and time.

So
<CFOUTPUT>#Dateformat(NOW(),&quot;DD/MM/YYYY&quot;)#</CFOUTPUT>
will output the Date and
<CFOUTPUT>#Timeformat(NOW(),&quot;hh:mm:ss&quot;)#</CFOUTPUT>
will output the Time.

you should look up what the options are for Date and Time formatting because you really have a lot of control there.

For instance on the Date &quot;DDD MMMM DD, YYYY&quot; will output as &quot;Fri June 01, 2001&quot;

Hope it Helps.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top