title: SQL: to_char alternative for Oracle AND SQL-Server
body: <p>I have some sql statements, which i am using for Oracle. This sql statements are used by a programm from me. 
  I want to support Oracle and SQL-Server with my program without having different sql statements for Oracle and SQL-Server.</p>
  
  <p>Which alternative can i use for the specific Oracle SQL-Statements:</p>
  
  <ul>
  <li>to_char(FIELDNAME, 'YYYY')</li>
  <li>to_char(FIELDNAME, 'YYYYMMDD')</li>
  <li>to_char(FIELDNAME, 'DD.MM.YYYY')</li>
  </ul>
  
  <p>The sql statements have to work for Oracle <strong>and</strong> SQL-Server.</p>