How to turn a comma-delimited list of date attributes into a MySQL date value?
Question: Not sure if I've worded my title correctly but here goes. I have a file of
jobs which are all in a similar format to this:

    
    
    423720,hparviz,RUN,512,22,Mar,10:38,11,April,14:06
    

Basically from this I need to covert the start date and end date to a format
which allows me to import it into mysql (22-Mar 10:38 - 11-Apr 14:06 or
however MySQL requires dates to be formatted). This data is extracted using a
command in linux, in which I'm manipulating the results to allow importation
to a MySQL database. Would it be easier to manipulate in Linux (during the
command), in Python (in the state I've shown) or MySQL (after importation).

If you need any more details let me know, thanks.


Answer: Assuming every line looks like what you posted:

    
    
    f=open(filename,"r")
    listOfLines=f.readlines()
    for line in listOfLines:
        splitLine=line.split(",")
        print "Day of Month: "+splitLine[4]#this is an example of one piece of info.
        print "Month: "+splitLine[5]#this is an example of one piece of info.
    

