Changing the order of digits in date

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
kristopher
Posts: 2
Joined: Sat Jun 10, 2006 11:16 am

Changing the order of digits in date

Post by kristopher »

Hello,
I have text files with the date at the beginning of the every line in such format:
month (2 digits)-day(2 digits)-year(four digits)

example
02-22-2005

I want to change it to:
year-month-day

like:
2005-02-22

Is any way to do it with the TextPipe?

Thanx for the answer
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Post by DataMystic Support »

Very easy, use the EasyPattern search/replace

[ capture(2 digits), '-', capture(2 digits), '-', capture(4 digits) ]

Replace with

$3-$1-$2
kristopher
Posts: 2
Joined: Sat Jun 10, 2006 11:16 am

Post by kristopher »

WOW
Indeed very easy

Thanx so much
:)
Post Reply