Hi,
I want to calculate differences between Datetime field and number field.
Any help would be appreciated!
Thanks in advance,
Kind regards,
Hey @acaryasin01,
Here is one way to do this:
First convert you date field to a date data type with the date time tool then use the DateTimeAdd function to subtract the days.
If your interested in learning more about the datetime functions there is a great cheat sheet Blog here: https://community.alteryx.com/t5/Engine-Works/DateTime-Functions-Cheat-Sheet/ba-p/844353.
Any questions or issues please askIra WattTechnical ConsultantWatt@Bulien.com
All the datetime functions are here DateTime Functions | Alteryx Help. Can you be more specific in what you are trying to achieve, it is possible to add or subtract a given number of days or months for example from a date. However you cant for instance do 15 minus 1970-01-01 as that does not make sense.
Hello. Just make sure to check the data type of your the fields you want to calculate the differences. Use a Select Tool and make sure you change the data type to a numeric data type. You can use a formula tool afterwards to calculate the difference.
Sorry @Jay-RDC and @IraWatt
To clarify it a bit more;
I have double data type field and I want to subtract the*is field from the Datetime field.