Jump to content

Timestamp help


sivanath.nagendran

Recommended Posts

Hi

  I am newbie to MySQL. I had done one project in that project I stored IN&Out time into MySQL database field type is timestamp. That field like this 07-06-2006 14.25.29.
 
  Now what I need, that is If is it possible for divide into two part  date and time from timestamp field  ? Is it possible?

thanks for your help

By

Sivanath.N
Link to comment
https://forums.phpfreaks.com/topic/29843-timestamp-help/
Share on other sites

[quote author=artacus link=topic=117764.msg483726#msg483726 date=1165974908]
>>  Is This not a normal (Good) question?

No, he's saying you'd be better off keeping it as a datetime field and just pulling the date and/or time pieces when you need them using DATE_FORMAT() or similar function.
[/quote]

Correct -- you don't store information in a DB for display purposes.
Link to comment
https://forums.phpfreaks.com/topic/29843-timestamp-help/#findComment-142100
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.