MySQL has a builtin function called "UNIX_TIMESTAMP()," which is what I
think you're looking for. Just do something like

  update ACCOUNTING set TIMESTAMP = UNIX_TIMESTAMP("2000-02-30 12:00:00")
where ...

The only catch is that you have to use that exact date format (yyyy-mm-dd
hh:mm:ss). If you do any programming, you could do almost any sort of
massaging in perl you wish, using, for example, the Time::ParseDate module
(it understands a textual date in almost any format). The above should
suffice even if you don't want to resort to programming.

Mike Nerone <mailto:[EMAIL PROTECTED]>
Network Operations Manager
Internet Direct, Inc.

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Colin Chan
> Sent: Tuesday, 06 June 2000 2144
> To: [EMAIL PROTECTED]
> Subject: (RADIATOR) Converting Dates to Unix format??
>
>
> Hi,
> I need to convert plain text dates to linux timestamp format, can this
> be done manually?
> I'm manually entering data into the mysql database and it seems as
> though the dates are stored in timestamp format
> eg: 959125652 is stored rather than a readable date, however this seems
> to convert to 05/24/00 if viewed on the web browser.
>
> Of course i cannot simply enter in the plain text date as is, because
> the conversion does not seem to show up properly on the web browser.
>
> Any suggestions would be appreciated. Thanks.
>
>
> ===
> Archive at http://www.starport.net/~radiator/
> Announcements on [EMAIL PROTECTED]
> To unsubscribe, email '[EMAIL PROTECTED]' with
> 'unsubscribe radiator' in the body of the message.
>


===
Archive at http://www.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to