Forum Discussion
Anonymous
2 years agoNot applicable
How to calculate difference between two dates
i want to calculate difference between created date and current UTC time, but its giving error. can someone plese guide here?
- 2 years ago
Hi Anonymous
You haven't said what the error is so I'm guessing as to what is in your Createddate column.
Also you say you want to calculate the difference between a time and date. I presume you mean the difference between two dates as you are looking for the Duration.Days
Try this
= Duration.Days(DateTime.Date( DateTime.LocalNow()) - [CreatedDate])Regards
Phil
PhilipTreacy
2 years agoSuper User
Hi Anonymous
You haven't said what the error is so I'm guessing as to what is in your Createddate column.
Also you say you want to calculate the difference between a time and date. I presume you mean the difference between two dates as you are looking for the Duration.Days
Try this
= Duration.Days(DateTime.Date( DateTime.LocalNow()) - [CreatedDate])
Regards
Phil