Re: Anyone using 'awk'
Posted in 1996
I am not that familiar with awk, but i did something similar some time ago. You could try something like: print substr($1,3,2)"/"substr($1,1,2)"/"substr($1,5,2) for DBDATE = MDY2/ or print substr($1,1,2)"."substr($1,3,2)"."substr($1,5,2) for DBDATE = DMY2. Good luck, Roland Noel O'Brien wrote: > > anybody out there using 'awk' programming language to format data > before loading ? > > I have a text column (char(6)) in an ascii file but need to change > it to a DATE format before loading > > have tried the following, > printf(", %d", $1) > > printf(", %s", $1+0) > > the ascii file holds the column like "020496" , with the quotes > > Any ideas > > Noel@paragon.ie