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)
 formatting number, text and date

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-04-12 : 09:28:28
kurt minds writes "Good day SQLTeam,

Is SQL SERVER 2000 has a 'Format() Function' that containing an expression formatted according to instructions contained in a format expression, like VB6 and MS ACCESS.

example...

------------
In Table
------------
[RefNo] [Date]
1 3/2/2006
2 4/21/2007
3 5/2/2005
4 1/23/2001
5 12/21/2003

--------------------
In Views or Analyzer
--------------------
REFNO format
=====
0000001 = Format([RefNo], '0000000')

or

0000-01 = Format([RefNo], '0000-00')


DATE format
===========
03/02/2006 = Format([RefNo], 'mm/dd/yyyy')
Jan 02, 2006 = Format([RefNo], 'mmm dd, yyyy')


THANK YOU SO MUCH!
"

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-04-12 : 09:36:04
You should format the data in your Front End application. Otherwise look for Convert in sql server help file

Madhivanan

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

- Advertisement -