MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Wayne Schuller Date:September 1 1999 5:01am
Subject:Inputting email date fields into Mysql date fields
View as plain text  
hi everyone,

I'm writing a mysql based email client. I have a date field for the email 
messages which is in DATETIME format. I'm having a hard time trying to 
figure out how to parse email date headers into a form by which they can be 
inserted into a DATETIME field.

An email date header looks like this:
Date: Tue, 31 Aug 1999 17:26:57 +1000

Getting rid of the "Date:" text is easy. Is there a simple function already 
set up to parse the rest of the string and put the result in a form that 
mysql will accept for DATETIME?
Or does anyone have any code to do this? It seems like a common enough 
function, I wanted to ask before doing it manually.

I've combed the mysql manual thoroughly and the C <time.h> functions, but I 
can't seem to find what I need.

Any help?

ta,
Wayne.
---------------------------------------------------------
Wayne Schuller - BSc. (Computer Science) Network Administrator
Centre for Health Program Evaluation - Austin Repat Hospital - Heidelberg.
Web: http://ariel.unimelb.edu.au/chpe/  My phone: (03) 94964448
w.schuller@stripped
Thread
Inputting email date fields into Mysql date fieldsWayne Schuller1 Sep
  • Inputting email date fields into Mysql date fieldsJani Tolonen1 Sep
Re: Inputting email date fields into Mysql date fieldsFaisal Nasim1 Sep