chess: (Default)
Right.

I have a text file, with dates in American format - m(m)/d(d)/yyyy, so today is 2/15/2002. Amongst a lot of other stuff, and I'd like to keep all the otherstuff the same.
I need to make a nice stand-alone-executable program which will just swap the month and day bits of each date it comes across around. (they're all a certain number of tabs (with otherstuff between the tabs) after a newline, if that helps.) This is because Access refuses to parse American dates from linked text files if your Windows regional settings are set to UK.
Any help / ideas as to how I could get this done?

Date: 2002-02-17 08:22 am (UTC)From: [identity profile] marble.livejournal.com
sed 's_\([0-9]\{1,2\}\)/\([0-9]\{1,2\}\)/\([0-9]\{4\}\)_\2/\1/\3_g' I think.

Date: 2002-02-17 11:52 am (UTC)From: [identity profile] dreema.livejournal.com
yeek

marble talks in an alien language :)

Date: 2002-02-18 01:52 am (UTC)From: [identity profile] jaq.livejournal.com
Perhaps you could make Access read that column as plaintext and write a VB function to convert it, then use it in a query with the date as a calculated field.

Date: 2002-02-18 05:08 am (UTC)From: [identity profile] phlebas.livejournal.com
Set your regional settings to US, start Access, open file, change settings?

Profile

chess: (Default)
Michelle Taylor

January 2025

S M T W T F S
   1234
567891011
12131415161718
19202122232425
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 2nd, 2026 12:39 pm
Powered by Dreamwidth Studios