FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Putting it all together
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Storing dates [message #186285 is a reply to message #186280] Mon, 23 June 2014 02:46 Go to previous messageGo to previous message
Mr Oldies is currently offline  Mr Oldies
Messages: 241
Registered: October 2013
Karma:
Senior Member
On Sun, 22 Jun 2014 21:56:57 +0200, Arno Welzel wrote:

> richard, 2014-06-22 20:05:
>
>> On Sun, 22 Jun 2014 08:53:17 +0200, Arno Welzel wrote:
>>
> [about date storage in databases]
>>> BTW: This is why ISO 8601 had been invented - see
>>> <http://en.wikipedia.org/wiki/ISO_8601>.
>>
>> Doesn't matter anymore. I am using the numeric day system instead.
>> where $date=date(z).
>
> Really? Literally "where $date=date(z)"? Looks very unusual.
>
> And even if this would make any sense - it least in MySQL date() is
> *not* a "numeric day system":
>
> < http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#functio n_date>
>
> Or did you switch to another database system?

http://www.php.net//manual/en/function.date.php

Day --- ---
d Day of the month, 2 digits with leading zeros 01 to 31
D A textual representation of a day, three letters Mon through Sun
j Day of the month without leading zeros 1 to 31
l (lowercase 'L') A full textual representation of the day of the week
Sunday through Saturday
N ISO-8601 numeric representation of the day of the week (added in PHP
5.1.0) 1 (for Monday) through 7 (for Sunday)
S English ordinal suffix for the day of the month, 2 characters st, nd,
rd or th. Works well with j
w Numeric representation of the day of the week 0 (for Sunday) through 6
(for Saturday)
z The day of the year (starting from 0) 0 through 365

http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#functio n_dayofyear

dayofyear() can now be used to convert back to calendar format.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: str_replace does not like empty quotes
Next Topic: SplFileObject always returns an extra "last" line -- why?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 03:57:09 GMT 2024

Total time taken to generate the page: 0.05036 seconds