Deducting Datetime field from CurrentDate time,No Clue

Hi All I am using a computing field i wanted to deduct the datetime from current date time,For which i am using a datetime field and deducting it from now.

for that i am using

Now - r_assignedon(this is my datetime field)

but it is giving me error

“Incorrect data type for operator or @Function Days Incorrect data type for operator or @Function Hours Incorrect data type for operator or @Function Minutes Incorrect data type for operator or @Function Seconds”

When i used Now-@created it’s working fine,can some one tell me where i am doing wrong,i have checked all datetime properties also.

Regards

Dali

Subject: Deducting Datetime field from CurrentDate time,No Clue

B,

Do you still get an error if you try Now - @Date(r_assignedon)?

Mike

Subject: RE: Deducting Datetime field from CurrentDate time,No Clue

Yes, Still i get error from this.

Subject: RE: Deducting Datetime field from CurrentDate time,No Clue

Do you get the error when the document first loads? (ie: there is no data in the date/time field?)

If there is a proper date in the field, I cannot see why @Now-r_assignedon should not work.

Any more info would be great

We’ll get to the bottom of this!!!

Mike

Subject: RE: Deducting Datetime field from CurrentDate time,No Clue

Yes Mike What I am doing is i am working on a workflow,where i need to calculate the date and time.Like I need to calculate the following

1)IF the Request is closed then it should be

r_closedon-r_assignedon(with another options–It’s working fine.

2)Else if the request is not closed then it should deduct the date and time from the current.

so it’s Now-@date(assignedon).

I am also pasting you my loop.It’s really harrasing me.

TimeTaken:=@If(r_assignedon!=“” & r_escalatedon=“”;(r_closedon - r_assignedon);r_assignedon!=“” & r_escalatedon!=“”;(r_closedon - r_escalatedon);(Now - @date(r_assignedon)));

oldval:=@If(r_escalatedon=“” & r_assignedon=“”;0;r_escalatedon=“”;((r_closedon - r_assignedon));((r_escalatedon - logged)));

@Text(@Integer(TimeTaken/86400)) + " Days "

@Text(@Integer((TimeTaken - (@Integer(TimeTaken/86400)*86400)) /3600)) + " Hours "

@Text(@Integer((TimeTaken - (@Integer(TimeTaken /3600)*3600)) /60)) + " Minutes "

@Text(@Integer((TimeTaken - (@Integer(TimeTaken /60)*60)))) + " Seconds";

Subject: RE: Deducting Datetime field from CurrentDate time,No Clue

It should be @Now or @Today, not Now or Today. You are getting scipt and @{formula mixed up.

“Now” means it will look for a field of that name on your document. “@Now” is an internal Notes function

Let me know if this works

Mike

Subject: RE: Deducting Datetime field from CurrentDate time,No Clue

Yes .Thanks.But it’s not working with all the documents.