Jump to content

Format date string yyyymmddhhmmss


rsquaredpgh

Recommended Posts

I've inherited a project on server a MySql 4.0 database running php 4.3. The problem is the timestamp info is stored as yyyymmddhhmmss. I need to echo this as a readable timestamp. i.e. (June 14th, 2010 06:29:21) etc.

 

Is this possible? On the forums I've read it seems that in Mysql 4.1 is where the timestamp improved drastically. Does anyone know how to code this? Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/204785-format-date-string-yyyymmddhhmmss/
Share on other sites

Thanks. I tried that and in place of the date I get the following error displayed on the page:

 

Warning: date(): Windows does not support dates prior to midnight (00:00:00), January 1, 1970 in D:\root\username\domain\www\index.php on line 256

 

Not really sure what to do now.

Like I said ... I inherited the project. I've been in touch with the server admin about migrating the files to a server with updated versions. Until then, I'm just trying to make it work.

 

What do you mean by input string, Ken? Which code piece are you referring to?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.