Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Community,
I'm using networkdays() to calculate the time duration between two date fields , it's showing correct answers when the two dates are from the same year but when the dates are from differents years the answers are not correct. has anyone here got the same problem using the formula ?
I'm using networkdays as an expression in a table between the two date dimensions.
Thank you for your help.
I can't reproduce this here:
=NetWorkDays(MakeDate(2015,12,1),MakeDate(2016,1,27))
returns 42.
How does your expression look like?
Im using this:
=NetWorkDays(Date_entree_dans_la_ged,Date_de_traitement)
im using the fields in my table to calculate time between each line not static dates.
What does
=Date_de_traitement - Date_entree_dans_la_ged
return as expression in your chart for the records with incorrect results?
How does your script code look like that generate these fields (reason why I am asking: Maybe the underlying numeric values is not really representing the date shown as text).
If possible, please post a small sample QVW that demonstrates your issue.
=(Date_de_traitement - Date_entree_dans_la_ged) also show's the wrong answers when the dates are from different years.
I'm getting the two date fields from a View in sql server under this format yyyymmdd and i transform them to the new format at the script using : date(date#("DATE_FIELD",'yyyymmdd'),'dd/mm/yyyy').
I will try to make a small QVW sample soon to demonstrates the issue.
Thank you again for your help.
Are you using exactely this statement:
date(date#("DATE_FIELD",'yyyymmdd'),'dd/mm/yyyy')
?
Note that the format code for month is 'MM', not 'mm', which is the code for minutes.
Use
date(date#("DATE_FIELD",'YYYYMMDD'),'DD/MM/YYYY')
instead