There are two datetime fields "cTime" and "schedTime". I would like to ignore the "date value" in both datetime fields below and only subtract the "time values"
For example, how can I subtract "cTime" from "schedTime" and ignore the date-part.
On row 2 below, I only want to subtract 14:56 -...
LB/Ibass,
The formula below is not working because the DateTime is not in two different fields. DateTime is only one field.
Datediff("s",datetime({table.scheddate},{table.schedtime}),datetime({table.close_date},{table.close_time})
"cTime" "schedTime" "earlyLate"
6/18/17 15:29 5/30/17 15:24...
Thanks LB for all your help with this!
Skip I apologize for not using the purple star to say thank you, and I will use the purple star next time.
However, you should at least mention that I always say thank you in my message just as did above.
Thanks again to ALL for the help you given me on...
Excellent suggestion! Please see dates for both schedule and close below.
I notice that some schedule dates are different. How can I modify the DateDiff formula to handle this?
"cTime" "schedTime" "earlyLate"
6/18/17 14:52 6/18/17 14:52 "OnTime"
6/18/17 14:56 5/30/17 15:00 "Late"...
Using the formula below, I get the data set below. The entire data set produces no "Early"
If DateDiff ("s", {apc_correlated.sched_time},{apc_correlated.close_date_time} ) < 0 then "Early" else
If DateDiff ("s", {apc_correlated.sched_time},{apc_correlated.close_date_time} ) > 360 then "Late"...
Notice that the second row says "Late" when it should say "Early"
In fact throughout the entire report I get no "Early". Can someone explain?
Thanks for your help. This is puzzling.
"cTime" "schedTime" "earlyLate"
14:52:34 14:52:34 "OnTime"
14:56:58 15:00:00 "Late"
15:07:46 15:07:46...
When {apc_correlated.sched_time} > {apc_correlated.close_date_time} I should get an "Early" value but I do not.
Can someone explain why DateDiff does not give me values less than 0?
If DateDiff ("s", {apc_correlated.sched_time},{apc_correlated.close_date_time} ) < 0 then "Early" else
If...
Thanks all for you feedback. I apologize for not responding sooner.
I was able to solve the problem by putting the code below in the "Section Expert" suppress formula.
Time({incident_log.sched_time}) = Time({trip.end_time})
Thanks again.
I would like to suppress records in two different tables.
I put the code below in "detail section expert" and it is not working. Can someone assist?
{incident_log.sched_time} = {trip.end_time}
Since I was trying to join "tr" to another table other than "ppd" (i.e., table "et") than I had to
change the statement below to a "RIGHT OUTER JOIN" and this seems to be working okay. See the working statement below.
Thanks for all your help with this.
"RIGHT JOIN et ON et.type = tr.type
Thanks for your help.
The LEFT OUTER JOIN is working, however the statement "LEFT JOIN tr ON et tr.type = et.type"
is giving me the error below.
How would I LEFT OUTER JOIN table "tr.type" to "et.type"?
[SQL]: select...
Can someone explain why the query below is getting the syntax error below?
How could I re-write this query to do a LEFT OUTER JOIN on the fields/columns below?
[SQL]: select ts,tr.type,et.text,tr.n,tr.loc_n,bus,drv,run,route,ttp,grp,des,seq,tpbc,longitude,latitude,tr.fs,amt
FROM tr LEFT OUTER...
Skip, instead of using Excel to try to pull in "schHdwyTrapeze" then I hard-coded the value in the formula below.
However in the statement below the {Command.start_time} = datetime("7:00AM") is not working.
If {Command.block_id} = 803006 and {Command.direction_code_id} = 4 and...
This is the "startTrip" Date join. The report will not run when I add the join below.
EXTERNAL JOIN schdHeadway_Trapeze_.startTrip={?cmtaocltdb: Command.start_time}
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.