" /> Brio/Hyperion - DATEADD Syntax for seconds past epoch (01/01/1970) - Genesys CTI User Forum

Author Topic: Brio/Hyperion - DATEADD Syntax for seconds past epoch (01/01/1970)  (Read 9816 times)

tony

  • Guest
Advertisement
Hi everyone!

I've been going around in circles trying to get the right syntax to add seconds to the epoch date (01/01/1970).  I have a field (from the LOGIN table) which contains a TIME key, which is seconds past the epoch date.  I've ensured that the digits are converted to a number and I've tried about 15 different formats to get the number converted to a simple date format, by using DATEADD.  Depending on where you look, the format is slightly different (java, vb, vba, sql, plsql, sqr, etc...) but none of them seem to work in Brio/Hyperion, against an Oracle database.  I'm adding a Computed Item in my Query Results, using a converted version of the TIME digits but all I get is (hash)NAME! as a result, no matter what I try... it's really annoying because this (I know!) is very very simple...

Does anyone have a working model/syntax for DATEADD, using seconds past 01/01/1970 for Brio/Hyperion running against Oracle 9i???

Thanks! :)

Offline borkokrz

  • Full Member
  • ***
  • Posts: 154
  • Karma: 6
Re: Brio/Hyperion - DATEADD Syntax for seconds past epoch (01/01/1970)
« Reply #1 on: November 16, 2009, 12:39:49 PM »
On Oracle try this as computed item:

to_date('1970-01-01','yyyy-mm-dd')+(Login.Time+7200)/86400

with DataType=Date in Brio.

7200 is for DST, change to 3600 for winter time.

Marked as best answer by on May 02, 2025, 03:36:09 AM

tony

  • Guest
Sorry, no - that didn't work... I can work with GMT so won't be needing a dateline offset...

I tried [color=blue]to_date('1/1/70 00:00 AM', 'm/d/yy HH:MM AM')+(Computed/86400)[/color]

where Computed = LOGIN.Time and Option = Data Type = Date (m/d/yy HH:MM AM)

Still get hashName!

:(


Offline borkokrz

  • Full Member
  • ***
  • Posts: 154
  • Karma: 6
Re: Brio/Hyperion - DATEADD Syntax for seconds past epoch (01/01/1970)
« Reply #3 on: November 16, 2009, 01:03:44 PM »
Strange, it os working fine in my environment. Check attached bqy.

tony

  • Guest
Re: Brio/Hyperion - DATEADD Syntax for seconds past epoch (01/01/1970)
« Reply #4 on: November 16, 2009, 01:12:13 PM »
Ahhh... I never thought to put it in the Query/Request - I was trying to apply it in the Results... doh!

That just goes to show that you can look at something for too long and lose sight of what you wanted in the first place... ;)

Thanks very much - works now..

T

Offline borkokrz

  • Full Member
  • ***
  • Posts: 154
  • Karma: 6
Re: Brio/Hyperion - DATEADD Syntax for seconds past epoch (01/01/1970)
« Reply #5 on: November 16, 2009, 01:19:12 PM »
you are welcome :-)