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 #186286 is a reply to message #186280] Mon, 23 June 2014 03:04 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?

BTW, date() itself is not anything but a function.
date(z) takes the current date of the server and trasnform it into a number
in the range of 1 to 366.

If the date were 2014-01-01, date(z) would return 1.
Dayofyear() takes that number and transform it back to the calendar date.

In my use of "where", I meant that as "an example", not as used by mysql
select from where stuff.
[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 17:18:40 GMT 2024

Total time taken to generate the page: 0.04113 seconds