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?
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.