473,385 Members | 1,901 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 2196
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Funnyweb | last post by:
I have just notices that the date() function is not returning the correct date/time on my "server". I am running apache2 on my winxp pro laptop. My system clock is set to the correct date,...
0
by: Nick Thurn | last post by:
Folks, I'm trying to define a oracle Java Stored Proc interface to an existing timeseries database. Series are accessed by name and are returned as vectors of type pairs, specifically (Date,...
4
by: Earl T | last post by:
When I try to get the netscape version for version 7, I get the HttpBrowserCapabilities class returning the version as 5 and not 7. (see code and output below) CODE HttpBrowserCapabilities...
3
by: sb Luis | last post by:
I Use the following code to read from MS Word, but I couldent read Formated Text (RTF). How Can I read formated text from MS Word Doc without using clipboard. thanks. Word.ApplicationClass...
2
by: Pat Brown | last post by:
I am pulling an integer value of the amount of seconds since 12:00 am from a SQL Server DB. I want to convert this integer into a formated string or datetime to display a legible time of day. Are...
6
by: SQL Server | last post by:
I've been working this for a while. Kind of new to SQL Server functions and not seeing what I am doing wrong. I have this function CREATE FUNCTION dbo.test (@Group varchar(50)) RETURNS...
11
by: walterbyrd | last post by:
My MySQL table has a field that is set as type "date." I need to get today's date, and insert it into that field. The default for that MySQL field is 2006-00-00. I know about the date()...
0
by: iheartvba | last post by:
Hi, I have got a document where there are headings which are always the same, but their sub categories are always different. The Structure is as follows: Line 1: Heading 1 Line 2: Sub Heading...
3
by: zandiT | last post by:
Hello I have an access report and im using a query to filter the report using Date parameters eg Start Date-12 May 2009 and End Date-30 September 2009. the query works perfectly. My problem is...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.