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 function using paramter

Author  Topic 

geossl
Yak Posting Veteran

85 Posts

Posted - 2004-10-05 : 05:27:26
Dear All,

Is there a function to format a datetime type using YYYY/MM/DD ?

Thanks.

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2004-10-05 : 05:43:45
select convert(varchar(10),getdate(),120)
Go to Top of Page

sabirpatel
Starting Member

22 Posts

Posted - 2004-10-05 : 06:17:21
For detailed explanation read the TSQL help.

Using CAST:
CAST ( expression AS data_type )

Using CONVERT:
CONVERT ( data_type [ ( length ) ] , expression [ , style ] )



Sabir Patel
email: sabirpatel@gmail.com
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2004-10-05 : 08:15:04
front end -- presentation layer

- Jeff
Go to Top of Page
   

- Advertisement -