'To_Char()' Function Does Not Work As Expected When Used With 'TimeStamp()' Function (Doc ID 1360284.1)

Last updated on MARCH 02, 2017

Applies to:

Siebel Tools - Version 8.1.1.4 SIA [21225] and later
Information in this document applies to any platform.
Checked for relevance 03-Feb-2015

Symptoms

The customer had a business requirement to capture and format a date/time value, so they performed the following configuration using a Calculated Field with the 'TimeStamp()' function and the 'To_Char()' function  to fulfill the business requirement.

a. Created a new Calculated Field

b. Used 'TimeStamp()' function to capture the current date and time

c.  Used 'ToChar' function to construct the string in format DDMMYYYY_HHMMSS (DD Day, MM Month, YYYYY Year, HH Hour, MM Minutes and SS Seconds).


So, the calculated field value was specified as:

'ToChar(TimeStamp(), 'DDMMYYYY_HHMMSS')'


Results:

The Day, Month, Year and Hours were successfully captured and displayed but the Minutes and Seconds were incorrect.  The Minutes were always displayed as '09' and the Seconds were always displayed as 'SS'


Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms