Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
gerhardl
Creator II
Creator II

New calculated time field

Hi, I have two fields, [Log Date] and [Decision Date], loaded as follows:

Date(Date#( left( [Log Date],9), 'DD-MMM-YY')) as [Log Date],
Date(Date#( [Decision Date], 'DD-MMM-YY')) as [Decision Date],

I would like to create a new field called [Process Time], which subtracts the Log Date from the Decision Date and returns me the number of DAYS.

So if Log Date is 18-APR-2011 and Decision Date is 20-APR-2011 the Process Time must be "2 days".

BUT if the application was logged and finalised on the SAME date (process time = 0 days), it must display as "Same Day"

Thanks,

G

13 Replies
chris_johnson
Creator III
Creator III

Think you have an extra bracket in at the start

if( Date#( left([LogDate],11),'DD-MMM-YYYY') = date#...

gerhardl
Creator II
Creator II
Author

Finally Success!!!

if(Date#( left( [Log Date],11), 'DD-MMM-YYYY') =date#([Decision Date],'DD-MMM-YYYY'), 'Same Day', date#([Decision Date],'DD-MMM-YYYY')-Date#( left( [Log Date],11), 'DD-MMM-YYYY')) as [Process Time],

Thank you guys,

G

chris_johnson
Creator III
Creator III

Glad you got there in the end!

Not applicable

Glad you solved your problem.

actually thank other guys who posted here. I'm just mixed their script ^^