November 25, 2014 at 2:15 pm
I am trying to get my feet underneath me in SQL Server after working with Oracle for a few years. I have a question I need help with. I am trying to create a table that has some date columns. I want to format the date columns to accept a specific date format for example YYYYDDMM. Is that possible? If so, how is it done? Any help will be greatly appreciated.
Thanks,
M. Hussain
November 25, 2014 at 2:54 pm
Date columns should use one of the available date data types (date, datetime, datetime2, etc). Those data types don't care about format. Different formats for input and display can be used with CONVERT() among the format styles accepted. As a best practice, I suggest the use of ISO format YYYYMMDD to avoid confusions.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply