Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have two fields Date Sent and Received
I want the difference of two fields in an another field say "Difference"
i.e Date Sent - Date Received = Difference
So that i can use the difference field in another chart as an expression.
I want the difference as number of days.
I have attached the Date.qvw.
Thanks in advance,
Keerthi
If the format of the fields is date , then you can simply subtract them and get the difference,
I format is not right the make those fields in date format by date, date \# or makedate functions and then substract them..
Regards
Nitin
Hi Keerthi,
(Date Sent - Date Received) didnt worked?
you Can use "Interval" function for this purpose
try it you will Succeed
In scripting or Back end
Interval(Date Sent - Date Received) as Difference
hi,
Use This Expression,
=sum(num(ows_DateSentToUnderwriter)-num(ows_DateReceivedAon))
In scripting or Back end
Interval(Date Sent - Date Received, D hh:mm:ss) as Difference
this will give you in Days
you can simple write ows_DateSentToUnderwriter - ows_DateReceivedAon in your script.
if your date that is sent and recevied are in format MM/DD/YYYY
just check this script it gives correct diffrence in no of days.
a:
load * Inline
[
sent,received
1/1/2013, 9/2/2013
2/1/2013, 11/1/2013
];
LOAD Date(received) - Date(sent) as daydiff
resident a;
DROP Table a;
anant
u can try the below in straight table :
Dimension:
Col1 -> ows_DateSentToUnderwriter
co2 -> ows_DateReceivedAon
Expression:
ows_DateSentToUnderwriter - ows_DateReceivedAon