At the moment I have:
select convert(varchar(10),getdate(),101);
Which produces 11/19/2009, however I need it to read 200911 i.e. (YYYYMM)
TIA
At the moment I have:
select convert(varchar(10),getdate(),101);
Which produces 11/19/2009, however I need it to read 200911 i.e. (YYYYMM)
TIA
My advice would be to format the date in your application, not in SQL Serer. If you format the date in SQL Server it will be sent as a text string to the application, rather than as a date/time datatype, and thus the applicaiton can do other useful things with it in its native format.
No one has followed this question yet.