Working a lot with loading SAP flat files on Chevron AuditDAD project we came into deeper need to understand some universal, language/culture neutral dateformat to use with SQL Server.
Classic format proposed by MS was yyyymmdd (DECLARE @d datetime = '20140101'; ). It was true (and is) for SQL Server 2008+ and before.
'yyyy-mm-dd' format works ok as neutral format for SQL Server 2008+ (date, datetime2 types), but is language dependent for datetime type (SQL Server 2005).
If we add a time part, then it is tough to find the right format to use.
Browsing the network we found an interesting format which is supported by SQL Server and can be safety used. It is ISO 8601. yyyy-mm-ddThh:mm:ss[.mmm] (no spaces)
format. T means Time part.
And SQL Server CONVERT function knows that standard to generate string presentation of date/datetime values:
SELECT CONVERT( nvarchar(30), SYSDATETIME(), 126 ) AS [iso8601];
and opposite is true and acceptable to convert from literal version to datetime type:
DECLARE @d datetime2 = '2014-01-01T13:02:35';