If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Subtract minutes from Date/time field

Started by Laynlowz, 12 Jun 2024 03:03:46 PM

Previous topic - Next topic

Laynlowz

How can I subtract minutes from a date/time field?


example is
Jun 4, 2024 12:20:45 AM

I want to subtract 12 hours from this to read
Jun 3, 2024 12:20:45 AM

there is a number of records with different date/times in the database so it would be any date/time record needs to have 12 hours subtracted.

I have tried _add_hours([Performance and Throughput].[Event Summary Header].[Facility - Event Start Date Time] , -12)  but the query just fails after running with no clear indicator of why it fails.

bus_pass_man

#1
Really?  Nothing in the logs?

It works for me.  What's the data type of the column you are using?  Is it possible that there are other variables in play which you have not mentioned?

You cannot view this attachment.

Quotethere is a number of records with different date/times in the database so it would be any date/time record needs to have 12 hours subtracted.
Are.  Not quite sure what you mean.  Also, I'm not sure if what you mean by record is what is commonly understood to be record.

Also the time stamp data type and the 12 hours business makes me think this is related to https://www.cognoise.com/index.php/topic,38131.0.html

Laynlowz

this is the error i receive

XQE-GEN-0018 Query Service internal error has occurred, please see the log for details.
CAF-WRN-2082 An error has occurred. Please contact your administrator. The complete error has been logged by CAF with SecureErrorID:2024-06-13-14:31:03.549-#1544

Laynlowz

Nevermind that formula works there was a weird data item that was left in the query that caused this.

Thanks!