Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Date Format

Author  Topic 

hemant_sql
Starting Member

1 Post

Posted - 2005-12-12 : 05:26:22
Hi,

I want to display date with suffix while storing into temp table.

For ex. if the date is like 1-nov-2005.

I want to stored date as 1st Day of November, 2005.

Regards,

Hemant.

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2005-12-12 : 05:33:07
well. all this kind of formatations, is better to do in front end.. since it provides with more features.. then pl sql..

still it cant be done then you any look for convert function in Book online

Sucess Comes to those who Believe in Beauty of their Dream..
Go to Top of Page

surendrakalekar
Posting Yak Master

120 Posts

Posted - 2005-12-12 : 06:16:57
Try this
Print ltrim(str(DATEPART(dd, getdate()))) + 'th Day of ' + DATENAME(mm, getdate()) + ', ' + ltrim(str(DATEPART(yyyy, getdate())))

Surendra
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-12-12 : 06:19:10
Use DateTime data type to store dates and dont worry how it is stored in a table. When showing them in the Front End Application, use Format function to format it to the way you want.

Where do you want to show the dates?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -