×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Text
Posted by: userc865b
Added: Dec 7, 2017 3:55 PM
Views: 3
Tags: mssqlserver
format date to make mssqlserver understand how to split date for example bevore instert
  1. -- Set date format to day/month/year.  
  2. SET DATEFORMAT dmy;  
  3. GO  
  4. DECLARE @datevar datetime2 = '31/12/2008 09:01:01.1234567';  
  5. SELECT @datevar;  
  6.