S/R DATE FLIP

General questions about using TextPad

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

Post Reply
Skye

S/R DATE FLIP

Post by Skye »

I know I saw this somewhere. I need the F8 instruction for taking a date formatted as
..............MM/DD/YYYY
and reformating it to
..............YYYY/MM/DD

Also, thanks again Ed for that spectacular MACRO tip ;)

Skye
Jens Hollmann

Re: S/R DATE FLIP

Post by Jens Hollmann »

Replace
\([0-9]\{2\}\)/\([0-9]\{2\}\)/\([0-9]\{4\}\)
with
\3/\1/\2

Rather a lot backslashes:
[0-9]\{n\} matches exactly n digits.
Everything neatly wrapped in \( and \) to group the year, month and day.

Mind that this is without using POSIX regular expressions!

HTH

Jens
Skye

Re: S/R DATE FLIP

Post by Skye »

BRILLIANT! Thank you so much Jens :)
Post Reply