Learn when you want, where you want with convenient online training courses. Sign up now!
[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More
Experts Exchange Solution brought to you by
"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.
Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.
select convert(varchar(8),getdate(),3) as [date_style_3]
, stuff(convert(varchar(8),getdate(),3),1,3,'') as [mm/yy with stuff]
,right(convert(varchar(8),getdate(),3),5) as [mm/yy last 5 char]
Open in new window
Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!
PATTERN STYLED DATE SYNTAX STYLE LENGTH
DD MM YY 23/02/01 convert(varchar(8), your_data_here ,3) 3 8
DD MM YY 23.02.01 convert(varchar(8), your_data_here ,4) 4 8
DD MM YY 23-02-01 convert(varchar(8), your_data_here ,5) 5 8
, STUFF(CONVERT(varchar(10),getdate(), 1), 4, 3, '')
Not sure why anyone would choose the arcane world of style numbers over the more intuitive FORMAT() syntax.
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.