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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

time problem

Status
Not open for further replies.

rbauerle

Programmer
Oct 16, 2001
48
BR
I need to get the server time and save it to db in a time field in the format: hh:mm:ss. Does anybody know how to get server time and convert to this format?

Thanks in advance...
 
If you are storing it in a db , what is the db - mysql?

mysql has datetime timestamp unixtimestamp field types which fill in automatically for you.

if not mysql just ignore me.

(If mysql and you havent set a timestamp field of any type you can do :
select cudate(); // will give you current date
or:
select date_format(curdate(), <options>); // this will allow formatting how you like. ______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top