I am migrating my oracle database to SQL Server. What is the easiest way to convert to_date functions? I have many sql which use to_date.
For example I have an update query. It contains following line.What can be solution to convert it to SQL Server 2008 with minimum effort?
Sample Query Line
LAST_LOGIN=to_date('" & m_LAST_LOGIN & "','DD.MM.YYYY HH24:MI:SS') ")
This page contains useful conversion information. From what you’ve given, the following should suffice. (Used with
getdate()as an example date)There is nothing directly to convert it to the format you specify, so you have to concatenate the two conversions as shown above.