Please note: For immediate customer service enquiries, you should contact SSE on one of the published SSE contact numbers or by email. SSE do not always reply to messages on social media. Complaints should be processed by phone, email and in writing only.
TO_CHAR - Convert Datetime to String - Oracle to SQL Server Migration. In Oracle, TO_CHAR function converts a datetime value (DATE, TIMESTAMP data types i.e.) to a string using the specified format. In SQL Server, you can use CONVERT or CAST functions to convert a datetime value (DATETIME, DATETIME2 data types i.e.) to a string. Oracle:
Here is a python reference that gives more examples and advanced features: http://docs.python.org/library/datetime.html. If you are coming from a .net or sql environment, here are the above examples in C# and SQL (Microsoft) for comparison: C#. DateTime myTime = new DateTime(); --Add 1 day myTime.AddDays(1); --Subtract 60 seconds myTime.AddSeconds(-60); --Add 2 years myTime.AddYears(2);