Posted by meltedown on 10/18/05 07:26
Mike Willbanks wrote:
>>>
>>> This is what I get:
>>> mysql> SELECT UNIX_TIMESTAMP('20051001');
>>> +----------------------------+
>>> | UNIX_TIMESTAMP('20051001') |
>>> +----------------------------+
>>> | 1128142800 |
>>> +----------------------------+
>>> 1 row in set (0.01 sec)
>>>
>> I don't get it. I don't know what "using local time" means;
>> I think I'm going about it all wrong anyway.
>> I'm trying to find the first and last day of the month of this datetime:
>> 2005-10-17 19:10:11
>
>
> The local time is specified by server time. If your server time is not
> set or not enabled mysql can not really give you timestamps. However,
> for what you are doing you could use the mysql function last_day(date)
> if you are using 4.1.1 or greater for the last day :)
>
> You should look into your server setup to see what is actually going on
> when you are running that query. I ran mine from the shell using the
> mysql client.
>
> Mike
>
I get timestamps all the time, so I don't see how that is the problem.
this seems to work:SELECT UNIX_TIMESTAMP('2005-10-01');
All I did was add the dashes
Navigation:
[Reply to this message]
|