date list manipulation

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
shippee
Posts: 12
Joined: Fri Dec 26, 2008 9:40 pm
Location: Olympia, Washington
Contact:

date list manipulation

Post by shippee »

I have a list of dates which runs from:

01/02/01
01/03/01
01/04/01
01/05/01
01/06/01
01/07/01
01/08/01
01/09/01
01/10/01
01/11/01
01/12/01
...
...
12/05/91
12/06/91
12/07/91
12/08/91
12/09/91
12/10/91
12/11/91
12/12/91
12/13/91

That is it runs from 1901 through 1991.
I need to replace the last two digits of the year with 4 digits of the year, so that 12/13/91 shows as 12/13/1991 and also end up with the forward slashes "/" removed.

What would be the best approach to do this? There are 3 other columns to the left of this column, for what it's worth.

Please and thank you in advance.
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Use "Posix" regular expression syntax:
Configure | Preferences | Editor

[X] Use POSIX regular expression syntax
Search | Replace... (<F8>):
Find what: \<([0-9]{2})/([0-9]{2})/([0-9]{2})\>
Replace with: \1\219\3

[X] Regular expression

Replace All
That is a perverse way to store a date!
shippee
Posts: 12
Joined: Fri Dec 26, 2008 9:40 pm
Location: Olympia, Washington
Contact:

regarding perverse way to store a date ...

Post by shippee »

It is for a data pool file wherein a load testing application feeds the date to an application which puts the "/" back in - so I need the raw data just as someone would type it from the keyboard, e.g., 09271951, as the application automatically adds the forward slashes.
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

someone
... if they are American.

And does it do what you want?
Post Reply