Re: Translating MySQL timestamp to datetime

From: Geoff Berrow (blthecat_at_ckdog.co.uk)
Date: 04/22/04


Date: Thu, 22 Apr 2004 14:20:09 +0100

I noticed that Message-ID: <MxPhc.44294$L31.36599@nwrddc01.gnilink.net>
from Joshua Beall contained the following:

>I already tried date("Y-m-d H:i:s",strtotime("20040422090941")), and had no
>luck. strtotime cannot handle that format.

Try converting it to a UNIX timestamp in the query e.g
SELECT UNIX_TIMESTAMP(mysql_timestamp)) AS unixtimestamp...

-- 
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/


Relevant Pages

  • Re: Multiple date formats in a Table
    ... could choose a future date so they all sort at the end. ... However if you are set up to use UK format dates of dd/mm/yy, ... converting any entries where you know the full date. ... > iii) Once you've got a function that works, create a new query in design ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Convert text string to number in a query
    ... This seems to be progress, it is converting to number, however it is ... rounding. ... I want to run a query that converts the text from the field into a number, ... albeit it was in number format. ...
    (microsoft.public.access.queries)
  • Re: Datepart function is it the right solution???
    ... I've got a problem with converting the date value from dd/mm/yyyy to ... Is there any way to convert the mentioned date value using the query ... If this is an actual DateTime DataType and not just a string that happens to ... want a different format then what you are getting by default. ...
    (microsoft.public.access.queries)
  • Re: Query/400
    ... taking a character date field and converting it to a numeric date field. ... In query use F17 in define results fields to check your system date format. ...
    (comp.sys.ibm.as400.misc)
  • Re: formatting a calculated number field on a form
    ... > A query in an MDB file CAN call a user-defined function. ... > function name is Age and it returns a double. ... The user will certainly "notice" if a patient was born on Jan ... I just want control over the *display format* of a number ...
    (microsoft.public.access.forms)