Current location: Hot Scripts Forums » Programming Languages » PHP » MySQL Date/Time Format


MySQL Date/Time Format

Reply
  #1 (permalink)  
Old 05-30-05, 12:24 AM
clarkmurray clarkmurray is offline
Newbie Coder
 
Join Date: Feb 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
MySQL Date/Time Format

My hosting company has a utility which allows me to dump the tables of a MySQL database in csv format for Excel. However, I can't figure out how to translate the numbers in date/time fields. Can anyone help?
Reply With Quote
  #2 (permalink)  
Old 05-30-05, 12:51 AM
blaw's Avatar
blaw blaw is offline
Junior Code Guru
 
Join Date: Dec 2003
Location: Vancouver, BC, Canada
Posts: 550
Thanks: 0
Thanked 0 Times in 0 Posts
Hello,

What exactly do you mean by "translate the numbers in date/time fields"?

If you want to convert numeric month to English, like "12" into "Dec", then it depends on when you want this to happen.

If you want these English months appear in your CSV file, then I suggest that you look into the table-dumping script that you mentioned, and if that is not possible for some reason, then you could try doing this conversion with PHP after the CSV file has been created (this might be troublesome somewhat), but if you want this only in Excel, then I thought you could simply set the property of the column to "Date" format within Excel and configure as you want (or whatever Excel has for displaying data in Date format).

HTH.
__________________
Blavv =|
Reply With Quote
  #3 (permalink)  
Old 05-30-05, 08:47 AM
FiRe FiRe is offline
Code Guru
 
Join Date: Oct 2004
Location: UK
Posts: 801
Thanks: 0
Thanked 0 Times in 0 Posts
are the numbers like '187462940' ??

its probably a unix timestamp, heres a great little converter for you...
Attached Files
File Type: zip utime.zip (2.4 KB, 226 views)
__________________
Alexa Share <-- Trade virtual shares in websites with this online game.

codR.us <-- Submit and vote for your favorite code snippets with codR.us.

XEWeb.net <-- The ultimate PHP resource network.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and MySQL ? rob2132 Hot Scripts Forum Questions, Suggestions and Feedback 4 08-29-08 02:22 AM
UPDATE: MySQL Auto Backup & Export v1.1 Beyonder General Advertisements 2 03-21-05 02:05 PM
MySQL format eq1987 PHP 1 10-05-04 08:38 PM
help plz: format retrieved Mysql data in HTML with PHP paulj000 PHP 2 10-19-03 08:03 PM
date format for mysql runya PHP 3 07-28-03 12:56 AM


All times are GMT -5. The time now is 06:49 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.