Siebel Developer's Reference > Operators and Expressions > Expressions >

Using the Timestamp Function


The Timestamp function returns the date and time for today. For example:

01/02/2012 11:15:22

You can use this function in a query. For example:

Created >= Timestamp() - 0.1

This code returns records that Siebel CRM created in the last one-tenth of a day.

Any expression that uses the TimeStamp function uses the date and time from the user computer even if the Siebel Server computer uses a different time zone.

The Today function and the Timestamp function might return different results. The TimeStamp function does UTC (universal time code) conversion. The Today function does not do UTC conversion.

Configuring Siebel CRM to Do Calculations with the Timestamp Function

Use the Timestamp function for fields of type DTYPE_DATETIME and DTYPE_UTCDATETIME. If you configure Siebel CRM to do a calculation that involves seconds, then it is recommended that you use at least five significant figures for accuracy.

You can configure Siebel CRM to do calculations with a date and time field in a calculated field. If the user enters a number in a date and time field, then:

  • Integers and hours represent days.
  • Fractions represent minutes and seconds.

For example, to add one minute to the current date and time, you can use the following expression, where one day contains 1440 minutes:

Timestamp() + 1/1440

In this example, Siebel CRM adds the product delivery interval, in seconds, to the current date and time:

Timestamp() + [Product Delivery Interval]/86400

You must set the Type property of the calculated field to DTYPE_DATETIME or DTYPE_UTCDATETIME.

Siebel Developer's Reference Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices.