Forum Discussion
JimB-GA
Helper III
7 years agoadding duration to date
Hello community. I have a table with one field that is number of days in it (decimal). I want to add this to a calendar date (01/01/1970). I have researched all options and am doing something ...
- 7 years ago
Try changing [T1] to Duration and then simply use + to add DateTime.FromText("1970-01-01") and [T1].
tarunsingla
Solution Sage
7 years agoTry changing [T1] to a Whole Number. DateAdd expects a whole number, and not a decimal.
- JimB-GA7 years ago
Helper III
Is there another function that will accept decimal values? The resulting value would represent intraday prices and eliminating the decimal portion would result in an inaccurate value.
- tarunsingla7 years ago
Solution Sage
Try changing [T1] to Duration and then simply use + to add DateTime.FromText("1970-01-01") and [T1].
- JimB-GA7 years ago
Helper III
Thanks very much. It works.
I just have to adjust for time zone and I have the total solution.
Jim B