Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Article Discussions
»
Article Discussions by Author
»
Discuss content posted by Gianluca Sartori
»
Dealing with custom date formats in T-SQL
33 posts, Page 1 of 4
1
2
3
4
»
»»
Dealing with custom date formats in T-SQL
Rate Topic
Display Mode
Topic Options
Author
Message
spaghettidba
spaghettidba
Posted Friday, March 23, 2012 12:04 AM
SSCarpal Tunnel
Group: General Forum Members
Last Login: Yesterday @ 3:43 AM
Points: 4,804,
Visits: 8,091
Comments posted to this topic are about the item
Dealing with custom date formats in T-SQL
Get your two-cent-answer quickly
The Spaghetti DBA
Post #1271388
Koen Verbeeck
Koen Verbeeck
Posted Friday, March 23, 2012 12:30 AM
SSCrazy Eights
Group: General Forum Members
Last Login: Yesterday @ 6:30 AM
Points: 9,410,
Visits: 6,495
Very nice article. The FORMAT function seems very promising!
One small remark: maybe include a link to the BOL page of CONVERT you're referring to. (although it's pretty easy to find using Google/Bing
)
How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
Member of
LinkedIn
. My blog at
LessThanDot
.
MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1271403
spaghettidba
spaghettidba
Posted Friday, March 23, 2012 1:25 AM
SSCarpal Tunnel
Group: General Forum Members
Last Login: Yesterday @ 3:43 AM
Points: 4,804,
Visits: 8,091
Thank you, Koen.
The BOL page for CONVERT is linked in the "built-in method so far" section. unfortunately hyperlinks are not easy to spot both on the forums and on the articles. The font is not much different from the regular text and I decided to emphasizes it with bold.
Get your two-cent-answer quickly
The Spaghetti DBA
Post #1271428
Koen Verbeeck
Koen Verbeeck
Posted Friday, March 23, 2012 1:27 AM
SSCrazy Eights
Group: General Forum Members
Last Login: Yesterday @ 6:30 AM
Points: 9,410,
Visits: 6,495
Gianluca Sartori (3/23/2012)
Thank you, Koen.
The BOL page for CONVERT is linked in the "built-in method so far" section. unfortunately hyperlinks are not easy to spot both on the forums and on the articles. The font is not much different from the regular text and I decided to emphasizes it with bold.
Whoops, you're right
Apparently I totally missed it. Disregard my statement
How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
Member of
LinkedIn
. My blog at
LessThanDot
.
MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1271429
surreydude.
surreydude.
Posted Friday, March 23, 2012 1:51 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Tuesday, June 04, 2013 6:33 AM
Points: 109,
Visits: 115
No mention of ISO date formats?
If the discussion is around how to present locale-specific date formats I would understand, but when converting dates an international standard must be one of the things that should be considered to detect malformed dates and prevent transposed dates.
Of course, it might just be easier to get the yanks to comply with the rest of the world in the first place!
Post #1271436
David McKinney
David McKinney
Posted Friday, March 23, 2012 3:10 AM
Mr or Mrs. 500
Group: General Forum Members
Last Login: Yesterday @ 1:10 AM
Points: 583,
Visits: 1,611
I think this is a great article, with a lot of tasty code to chew over.
Thanks for putting in the effort and sharing!
Post #1271469
spaghettidba
spaghettidba
Posted Friday, March 23, 2012 3:13 AM
SSCarpal Tunnel
Group: General Forum Members
Last Login: Yesterday @ 3:43 AM
Points: 4,804,
Visits: 8,091
surreydude. (3/23/2012)
No mention of ISO date formats?
If the discussion is around how to present locale-specific date formats I would understand, but when converting dates an international standard must be one of the things that should be considered to detect malformed dates and prevent transposed dates.
ISO 8601 dates are handled by SQL Server using the CONVERT function, with styles 126 and 127.
See here for more detail:
http://msdn.microsoft.com/en-us/library/ms187928.aspx
Of course, it might just be easier to get the yanks to comply with the rest of the world in the first place!
Well, they did (sort of).
As a side note, I'm not a "yank".
Get your two-cent-answer quickly
The Spaghetti DBA
Post #1271472
spaghettidba
spaghettidba
Posted Friday, March 23, 2012 3:14 AM
SSCarpal Tunnel
Group: General Forum Members
Last Login: Yesterday @ 3:43 AM
Points: 4,804,
Visits: 8,091
David McKinney (3/23/2012)
I think this is a great article, with a lot of tasty code to chew over.
Thanks for putting in the effort and sharing!
Thank you, David.
Get your two-cent-answer quickly
The Spaghetti DBA
Post #1271474
charles.southey
charles.southey
Posted Friday, March 23, 2012 3:31 AM
Forum Newbie
Group: General Forum Members
Last Login: Tuesday, May 07, 2013 3:46 PM
Points: 6,
Visits: 34
If you want a commercially-supported CLR-based utility for this our
SQLUtilities
product includes a wide range of date formatting & parsing functions, as well as other useful date/time, string handling and numeric functions (e.g. return a dynamically-generated sequence of dates and/or times as a table-valued function).
Charles Southey
www.totallysql.com
Charles Southey
www.totallysql.com
Post #1271478
spaghettidba
spaghettidba
Posted Friday, March 23, 2012 3:50 AM
SSCarpal Tunnel
Group: General Forum Members
Last Login: Yesterday @ 3:43 AM
Points: 4,804,
Visits: 8,091
charles.southey (3/23/2012)
If you want a commercially-supported CLR-based utility for this our
SQLUtilities
product includes a wide range of date formatting & parsing functions, as well as other useful date/time, string handling and numeric functions (e.g. return a dynamically-generated sequence of dates and/or times as a table-valued function).
Charles Southey
www.totallysql.com
Charles, I'm not sure this is a good way to promote your product.
I don't know if the editors are happy with ADs on these forums. Have you checked it with them before posting?
Get your two-cent-answer quickly
The Spaghetti DBA
Post #1271484
« Prev Topic
|
Next Topic »
33 posts, Page 1 of 4
1
2
3
4
»
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.