Changing the order of digits in date

Get help with installation and running here.

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 » Sat Jun 10, 2006 11:29 am

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: 2217
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Post by DataMystic Support » Tue Jun 13, 2006 2:51 pm

Very easy, use the EasyPattern search/replace

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

Replace with

$3-$1-$2
Regards,

Simon Carter, https://www.DataMystic.com
https://www.JadeDiabetes.com - Insulin dose calculator for Type 1 diabetes
https://www.DownloadPipe.com - 250,000 free software downloads

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

Post by kristopher » Wed Jun 14, 2006 12:04 am

WOW
Indeed very easy

Thanx so much
:)

Post Reply