Using string format

  • Thread starter Thread starter William F. Robertson, Jr.
  • Start date Start date
W

William F. Robertson, Jr.

I have a question about the string formatting function.

I have a field in a database that is coming back as a 6 digit date:

061503

I would like to format this out to 06/15/03 to be displayed on a page.

What StringFormat parameter do I apply to the Column to get this desired
result? Or should I be converting in in the SqlQuery? If the query option
is the correct one, how do I do that in the query.

Currently the field is a nvarchar that gets converted to varchar

SELECT Convert( varchar, Cycle, 1 ) as CycleDate FROM ...

Thanks,

bill
 
Back
Top