Hi, Thanks for your time,
I have a field in SQL server with datatype as nvarchar(255)...and it includes the dates in MM/DD/YYYY format...
I need to calculate the number of days and convert it into string so that in the same column i can have Gap when there is no date value and a number when there is a date in it...
If([SignoffDate] = 'Gap', 'No-Data', [SignoffDate]+365 -today() ) as SignOffForecast (Minus today() we dont need to consider the timepart
once the number of days are caclulated convert to string so that it can have No-Data or the number of days
Solved! Go to Solution.
@Raj_007
Not 100% sure about the your formula part, but I am sure you can get some hints.
Hi,
could someone help.. i need to calculate the number of days from the datevalue then convert into string so that i can have the string value like "No Data"
when i try to open the file provided by Qui.. it gives me an error
Hi @Raj_007 ,
you could use a Formula tool:
Within the formula you can use a condition, if conversion should be done.
Let me know if it works for you.
Best,
Roland
Hi @Raj_007
What error are you getting? I saw that you were able to open the workflow @Qiu sent.
I believe the function is doing what you asked. SignoffDate + 365 - today(), in this case is doing SignoffDate - today + 365. Which is the same thing.
DateTimeDiff([SignoffDate_Out],DateTimeToday(),"Days")+365
Is this not what you are looking for?
Pedro.
Thank you so much pedrodfaria - i was getting conversion error - but the solution provided by Roland works very well
thanks a lot - really appreciate your time -
Hi Roland, thank you so much...so the input format is the key here and converting it into string... really ..appreciate your time