Using string format

  • Thread starter William F. Robertson, Jr.
  • 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top