No, the following link states it will count both the start day and end day so the answer should be 3. I only get the result of 1 no matter howmany days are between, sonthing is not calulating right and I can't figure out where the problem in the formula is...
I even tried putting the if statement in parentheses. The formula had no errors but I still get the same result.
WhileReadingRecords;
Local DateVar Start := (If {Schedule.Activity} = "002881" then
date ({Schedule.App_DtTm}));
Local DateVar End := (If {Schedule.Activity} = "Volumes Ap" then...
I just tried putting the if statement within the local dateVar Start and End but I get the same result. as stated above.
WhileReadingRecords;
Local DateVar Start := If {Schedule.Activity} = "002881" then
date ({Schedule.App_DtTm});
Local DateVar End := If {Schedule.Activity} = "Volumes Ap"...
Thanks LB, I did add the colons and I get no error in the formula but it still does not return the right data. I have a record that have a simulation date of 1/19/2011 (Wed) and a Volumes Approved of 1/21/2011 (Fri). The result should be 3. It still returns a result of 1. I am wondering if...
Thanks lbass, I took your suggested link and developed the following formula. This formula is supposed to count the days bettwe the start date (1/19/2011) and end date (1/21/2011). The results of the formula should be 3 but I am getting a result of 1. I added a condition to the formula and I...
Hi lbass, Thanks for getting back to me. I ws out of the office on Friday, so sorry I did not get back to you.
I would like to calculate only weekday hours between 6:30 am and 7:00 pm (Monday thru Friday).
Thanks, John
I reveived the very valuable information below for LBass. It work perfectly. But after looking at the data, it calculates all hours in in a week. Now I am getting into an area that I am less familiar. My question; is there a way to eliminate weekend hours and only calculate the hours Monday...
LBASS, what worked perfectly, you are always a big help! My problem, and I do this often, is trying to build it all in one formula. This will help me tremendously! Thank you!
-John
I am creating a formula field in Crystal Reports. I have the formula named and am having trouble with the syntax. I need this to be a conditional formula and the result will be the time difference between a dates/time field based on a condition.
The fields are:
{Schedule App_DtTm} which...
I have a question about caluculating dates/times:
I have a report that that uses the following fields; {Schedule.ApptDtTm} and {Schedule. Activity} that gives me a time-line of scheduled appointments based on the activity. The results of my report looks like this:
Patient: XXX
DATE/TIME...
I ran the report that way and I got all my data except the activities 4,5,6 equaled S.
Would the OR confuse the formula, it is one OR the other, not both?
{Schedule.Status} <> "X" and
{Schedule.Status} <> "S" and
select {Schedule.Activity} in ["1", "2", "3"] and
select {Schedule.Activity} in ["4", "5", "6"] and
{Schedule.SchStatus_Hist_SD} = "S"
This is how I wrote the formula. But when I run it; activities 1,2,3 work fine, but I still get all...
Thanks NiceArms! It did work for me and pointed me in the right direction for some other reports I am writing. I did exclude all status X and S and them selected only those activities that I needed to display that did have the status S.
You Rock!
I need help with a report on two field with two separate data selections on these two field and show the results in the same report.
The two fields are {Schedule.Activity} and {Schedule.Status}
I need to select:
From the {Schedule.Activity} I need to select the activity [“1”, “2”, “3”] where...
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.