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 Formatting issue

Author  Topic 

Vivaldi
Constraint Violating Yak Guru

298 Posts

Posted - 2001-08-14 : 13:28:32
Hey Sql Psychos

Basic question.

I have a datetime field in Sql Server 2000,
I am writing a view for an external system to access some data, the external system wants the date in yyyymmdd format as a varchar.
I casted the parts of the date and appended them together but i get yyyymdd or yyyymmd

How can I force the day and month with leading zero (this is super simple in VB or vbscript. Is there a simple way to do this?

thanks.

Composing temporary solutions to permanent problems
   

- Advertisement -