Web Hosting Talk







View Full Version : Need a trick to change/replace date


Santana
11-20-2000, 01:42 AM
Hello,

Anyone has any trick to replace text?
I have 5,000 data with | delimiter, and the field Date contains date-mon-year (ie. 19-Jul-2000)

and need to replace them with the following format:
year-mo-date (ie. 2000-07-19)

anyone has a trick to do it in microsoft word or anyword processor or maybe in mySQL query command?

thanks

etLux
11-20-2000, 02:49 AM
Ouch.

Maybe post this over in software help.

I think you could probably cook a macro in Word or possibly even trick Excel into doing it with a cell format change -- but this isn't really my end of Creation.

Old codeheads like me would probably write a script to do it... lol.

kunal
11-20-2000, 03:15 AM
Whats the connection between MySQL and Ms Word?

Santana
11-20-2000, 03:33 AM
What I need to do is just replacing the date format and then export them to the mySQL table.

I don;t know how to change it using mySQL query, so I just though the primitive way LOL


Originally posted by kunal
Whats the connection between MySQL and Ms Word?

kunal
11-20-2000, 03:38 AM
Lol.. oh ok.. well I would recomend that you should first move it all to mysql and then make the changes. Then the changes would be easy.

inwks
11-20-2000, 04:23 AM
Load into Excel, reformat the field you want to change, and save as the desired format. Usually works.

Wazeh
11-20-2000, 01:40 PM
It can probably be done easily with awk. If your file
is on a unix box, why don't you post or email me a sample (1 record) and I will see what needs to be done to reformat it. Or, if you are adventurous, type 'man awk' and enjoy :D