Page 1 of 1

date list manipulation

Posted: Thu Feb 02, 2012 6:20 pm
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.

Posted: Thu Feb 02, 2012 6:57 pm
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!

regarding perverse way to store a date ...

Posted: Thu Feb 02, 2012 7:18 pm
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.

Posted: Thu Feb 02, 2012 7:35 pm
by ben_josephs
someone
... if they are American.

And does it do what you want?