title: How to get the current session's dateformat
body: <p>If you want to set the dateformat to some style say, ddMMyyyy, in sql server we can use the following statement:</p>
  
  <pre><code>SET DATEFORMAT dmy
  </code></pre>
  
  <p>My question is how to know before hand that this is the format set?</p>
  
  <p>The program I am writing needs to determine, if the above is the actual datetimeformat, else set it and continue with rest of execution.</p>
  
  <p>How is this possible? Else is my only approach, to set it to my desired format and continue with execution?</p>
  
  <p>I hope setting this won't affect other sessions (connections)?</p>