Page 1 of 1

Data conversion tasks

Posted: Sat Jul 12, 2008 11:44 pm
by getsatish_gk
Hi, i m facing issue at

converting date (yyyy-mm-dd) to dd/mm/yyyy
converting date (dd-mon-yyyy) to dd/mm/yyyy

i tried unsuccessfully with convert function..

can any one came across such tasks? :x

Posted: Sun Jul 13, 2008 12:05 am
by ray.wurlod
They are fairly frequent requirements. However, Convert() would not be the correct function to use, as it effects character-by-character replacement. The actual solution will depend on the data type of the input column and the output column, but will involve some combination of DateToString() and StringToDate() with appropriate date format strings.