Welcome Guest, Not a member yet? Register   Sign In
how to convert values to timestamp type in codeigniter
#7

[eluser]fesweb[/eluser]
Quote:and get the following result: 1378133405 what does it mean?
That 10 digit number is a UNIX timestamp, which is how PHP refers to dates. In your case, it literally refers to a specific time that is 1378133405 seconds after January 1, 1970: url=http://www.unixtimestamp.com/]unixtimestamp.com[/url]

Dealing with dates can be a tricky business, and you will always need to remember that PHP's date functions rely on the UNIX timestamp, so you now have to learn about it and work with it. MySQL formats those same dates in the 'Y-m-d H:iConfused' format. You will need to convert back and forth between those two formats (and others) often. The links that others included above will help you with that.

In my experience, when you don't get the expected result with dates, it is almost always a format or conversion issue.


Messages In This Thread
how to convert values to timestamp type in codeigniter - by El Forum - 07-29-2011, 01:20 PM
how to convert values to timestamp type in codeigniter - by El Forum - 07-29-2011, 02:26 PM
how to convert values to timestamp type in codeigniter - by El Forum - 07-29-2011, 03:14 PM
how to convert values to timestamp type in codeigniter - by El Forum - 07-30-2011, 01:30 AM
how to convert values to timestamp type in codeigniter - by El Forum - 07-30-2011, 03:20 AM
how to convert values to timestamp type in codeigniter - by El Forum - 07-30-2011, 03:51 AM
how to convert values to timestamp type in codeigniter - by El Forum - 07-30-2011, 09:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB