Changing the order of digits in date

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

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

Changing the order of digits in date

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

Postby 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, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

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

Postby kristopher » Wed Jun 14, 2006 12:04 am

WOW
Indeed very easy

Thanx so much
:)


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests