CRM On Demand - Administration (MOSC)

MOSC Banner

Set a specific hour in the Timestamp()

Hello All,

We are working with workflows and are currently strugling with the Timestamp() function.

We would like to be able for a workflow to run sundays at a specific hour of the server time.

We use the common formula for this : Timestamp() + (6 - (1.0 * IfNull( Mid(1.0 * JulianDay(Timestamp())/7,8,2),0)/(7*2)))    and put it in hour wait "Until when".


We were hoping that using the ToChar() function like this :


ToChar(Timestamp() + (6 - (1.0 * IfNull( Mid(1.0 * JulianDay(Timestamp())/7,8,2),0)/(7*2))),"MM/DD/YYYY")      that it would set automatically the hour to 12:00 AM, but it does not.


In the "ToChar()" documentation there is a caution saying : CAUTION: Do not use both date formats and number formats in an instance of the ToChar function. Doing so can lead to invalid results.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

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

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center