LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-02-2003, 10:22 AM   #1
spyghost
Member
 
Registered: Jun 2003
Distribution: Redhat
Posts: 245

Rep: Reputation: 30
loading data from a flat file with a date and time having a different format


hi,

i am doing a web based database project whose function is to retrieve and format data only in the web browser.

i suddenly came across this problem in loading a flat file to a database when i found out that the date and time are in different formats...
example:


* the date in file1 is mm/dd/yy and the time is hh:mm:ss
* the date and time in file2 are combined in one column dd/mm/yyyy_hh:mm:ss


both files are located in a single database, but different tables entierly independent of each other.

how will i be able to load this kind of flat file in a mysql database?

* i need to separate date and time because they will be shown in the web browser in a tabular form.

thanks...
 
Old 11-02-2003, 10:27 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Just use a regular expression in whatever programming language you use to rearrange the data.
 
Old 11-02-2003, 04:40 PM   #3
spyghost
Member
 
Registered: Jun 2003
Distribution: Redhat
Posts: 245

Original Poster
Rep: Reputation: 30
i don't get it... isn't it that loading a text file uses the LOAD DATA command? i can't seem to understand where to put the regular expressions there...
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Start Date + Time Duration = End Date/Time calculator? ToBe Linux - General 3 09-26-2005 10:17 AM
convert date time format given in string suchi_s Programming 6 01-10-2005 04:06 AM
Deleting data from file by date? mephitic Linux - Newbie 3 09-22-2004 12:33 PM
Bug report: wrong date/time format in last visited wipe LQ Suggestions & Feedback 0 07-29-2004 06:21 AM
Where can I look for the config file for modified date and time ForumKid Linux - General 1 09-19-2003 08:05 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration