Page 1 of 1

Reformatting a date

Posted: Tue Oct 05, 2004 2:29 am
by Rusty
Sorry for the noob question, but we are using datapipe/textpipe to try and reformat a date (in a varcvhar field). It currently is represented as:

20041004

And we need to insert hyphens:

2004-10-04

What's the simplest method?

Thanks

Posted: Wed Oct 06, 2004 11:52 am
by DataMystic Support
Use an EasyPattern

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

replace with

$1-$2-$3