469,626 Members | 1,010 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,626 developers. It's quick & easy.

Returning formated date

Hi
I have to return dates formated in different ways in an asp page from sql
server.
What function can I use or how can I return dates formated like so

I tried DATEPART ie.. but that does not work they way I would expect

"dd/mm/yy"
"dd/mm/ccyy"
"mm/dd/ccyy"
"mm/dd/yy"
"dd mmm ccyy"
"ccyymmdd"

Regards
Nancy
Jul 19 '05 #1
3 2064
Look at the
convert function in Bol
--
Roji. P. Thomas
SQL Server Programmer ;)
________________________
"Don Grover" <sp******@assoft.com.au> wrote in message
news:O$**************@TK2MSFTNGP12.phx.gbl...
Hi
I have to return dates formated in different ways in an asp page from sql
server.
What function can I use or how can I return dates formated like so

I tried DATEPART ie.. but that does not work they way I would expect

"dd/mm/yy"
"dd/mm/ccyy"
"mm/dd/ccyy"
"mm/dd/yy"
"dd mmm ccyy"
"ccyymmdd"

Regards
Nancy

Jul 19 '05 #2
To add to Roji's response, consider formatting dates in your application
code. Formatting data for presentation is usually best handled in client
code.

--
Hope this helps.

Dan Guzman
SQL Server MVP
"Don Grover" <sp******@assoft.com.au> wrote in message
news:O$**************@TK2MSFTNGP12.phx.gbl...
Hi
I have to return dates formated in different ways in an asp page from sql
server.
What function can I use or how can I return dates formated like so

I tried DATEPART ie.. but that does not work they way I would expect

"dd/mm/yy"
"dd/mm/ccyy"
"mm/dd/ccyy"
"mm/dd/yy"
"dd mmm ccyy"
"ccyymmdd"

Regards
Nancy

Jul 19 '05 #3
Thanks all working now, had to format in code and add correct headers , now
work well.
Thanks Guys

"Dan Guzman" <da*******@nospam-earthlink.net> wrote in message
news:OZ**************@tk2msftngp13.phx.gbl...
To add to Roji's response, consider formatting dates in your application
code. Formatting data for presentation is usually best handled in client
code.

--
Hope this helps.

Dan Guzman
SQL Server MVP
"Don Grover" <sp******@assoft.com.au> wrote in message
news:O$**************@TK2MSFTNGP12.phx.gbl...
Hi
I have to return dates formated in different ways in an asp page from sql server.
What function can I use or how can I return dates formated like so

I tried DATEPART ie.. but that does not work they way I would expect

"dd/mm/yy"
"dd/mm/ccyy"
"mm/dd/ccyy"
"mm/dd/yy"
"dd mmm ccyy"
"ccyymmdd"

Regards
Nancy


Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by sb Luis | last post: by
11 posts views Thread by walterbyrd | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.