Subtracting a date
mgrenick1
Forums
Hi
Can anyone help me with a function basic or @ that will allow me to subtract a specificed time from a date.
E.g. in basic this would be DateAdd("M", -1,"01/01/2015") would give 01/12/2014 - (thats in english DD/MM/YYYY format) but the dateadd function does seem to exist in IDEA
thanks
Hello,
Hello,
Unfortunately there is no dateAdd function in the IDEA @ functions. You can do it but it is a bit on the cumbersome side to do. An easier way is to create a custom function that allows you access to visual basic commands, unfotunately the DateAdd function is not supported (or at least I can never seem to get it to work) but the dateSerial function does work. So I created a custom function that uese the dataSerial function to do the calculation you want.
I have attached the function. I have done limited testing on it so please validate the results before relying on it and let me know if you find any problems.
Thanks
Brian