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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reset datetimevar

Status
Not open for further replies.

ij76

Technical User
Mar 15, 2005
25
CA
How do I reset a datetimevar?

It won't let me use datetimevar x:=0
 
Try:

datetimevar x:= datetime(0,0,0,0,0,0);

-LB

 
If resetting to today's date use;

dateTimeVar x := CurrentDate;
 
Can I reset it to a null? If so, how?
 
Maybe you should share the formulas where you are using the variable and explain what you are trying to do in resetting it. It would help to know your report structure and where you are placing each formula.

-LB
 
OK (and I will add the other problems I am having while I'm at it), I have a report grouped by incidentid for each incident there are statuses with dates. The statuses can be repeated (ie, it can change from Open to pending closure to info required to pending closure to closed).

I have created variables for New, Open, First Response, Pending Closure and Closed and placed them in the details lines. I then added the above reset variable and put that in the group header. In the group footer I plugged in these variables again (except the reset).

First problem is, as there may be two Pending Closure statuses, in the footter, is displays the last one, I need it to display the first one.

Also, what I am trying to do is get a formula working to find the difference in minutes between two of the datetimes. I am also having a problem with this....I tried a basic datediff("n",datetimevar Open,datetimevar Resp) in the group footer, and it comes back with a 0.00.

I really need the following datediffs:

- if there is no New datetime find the diff between Open and First Response, else find diff between New and First Reponse

- find the diff between New, or Open if New is null, and the first Pending Closure status (as I said there may be a few per incident). If there are no Pending Closure status dates, then use the Closed date.

I guess I don't need to reset to Null, but thought that might make the formulas a little easier when choosing between New and Open, and Pending Closure and Closed.

If you could help with the above formulas, that would be great....since I can't even get the simple datediff to work, I'm not sure how to start with these two formulas!

 
You need to share the contents of your formulas so we can troubleshoot.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top