Posted by meltedown on 10/18/05 05:49
Mike Willbanks wrote:
> meltedown wrote:
>
>> Why does this return 0 ?
>>
>> SELECT UNIX_TIMESTAMP('20051001');
>>
>> It should be the unix timestamp of that date.
>
>
> That would suggest you are using local time, if there a locale set on
> mysql and also another thing to check, is the date set :)
>
> 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
Navigation:
[Reply to this message]
|