This topic contains 1 reply, has 0 voices, and was last updated by errol 8 years, 7 months ago.

  • Author
    Posts
  • #5317 Score: 0

    rosse
    • Contributions: 0
    • Level 1

    Is there a formula to split the date and time from Date/Time field?

    Basically I need to have a date column based on an existing Date/Time field and it should have the date from the Date/Time field if the time is prior to 2 pm PST and if it is after 2 PM, add a day to the date.
    This is a cached copy. Click here to see the original post.

  • #5318 Score: 0

    errol
    • Contributions: 0
    • Level 1

    Below will add 10 hours to the date which should be exactly what you want.

    Code:
    Formula (Date): {datecreated} + 10/24
    Also, to answer the question you asked, you could get the hours by using to_char and to_number to then do some arithmetic on it. For example:

    Code:
    to_number(to_char({datecreated}, ‘HH24’))

You must be logged in to reply to this topic.