Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Substract two timestamp field 1

Status
Not open for further replies.

charly04

MIS
Oct 28, 2009
3
CA
Hello everyone,
I have in a report two timestamp attribut that I display as Time format. Now, I'd like to substract them by creating either an attribut or a metric.

I tried to create an attribut that does A-B, I got an error when I execute the report. I also tried to create a metric with the ApllyAgg("(#1-#0)",[date 1],^date2]), it didn't work.
Could someone help me?

I'm using MStr 8.0.1
 
one way to accomplish this is to create a third attribute using ApplySimple("datediff(minute,#1,#0)",[date1],[date2]).

The "datediff" works on MS-SQL. You may need to use a different syntax, if using a different database.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top