Hi,
I'm using LiveCycle Designer 8.1 and am trying to calculate the differnce between 2 date fields.
My script keeps retuning an unexpected values - such as -40,551 (When 09-01-2011 is entered in the form1.Account_Profile_1.DateTimeField3 field and 09-23-2011 is entered in the WO_date_ship_first_order field.)
The code is FormCalc on (exit) from a date field: WO_date_ship_first_order
This is the script: WO_calc_cycle_lead_time.rawValue = Date2Num(WO_date_ship_first_order.formattedValue, "DD-MM-YYYY") - Date2Num(form1.Account_Profile_1.DateTimeField3.formattedValue, "DD-MM-YYYY")
I am a bit stumped. Both date fields are set as User Entered optional w/ filter date{MM-DD-YYYY} (data and display)
Thanks ~ Ken
Solved! Go to Solution.
Views
Replies
Total Likes
Well you have the pattern set to MM-DD and the Date2Num formula set to DD-MM so it is probably confusing the days and months.
Views
Replies
Total Likes
Well you have the pattern set to MM-DD and the Date2Num formula set to DD-MM so it is probably confusing the days and months.
Views
Replies
Total Likes
whyisthisme,
Good Eye!...That was exactly it.
Sorry, I must have been tired.
Thanks ~ Ken
Views
Replies
Total Likes