- Joined
- Feb 1, 2024
- Messages
- 3
- Reaction score
- 1
So, I can use NOW to get today, but I can't find an easy way to get yesterdays date, any suggestions?
Where am I putting this?DateTime.Now.AddDays(-1)
Quick Google search would've told you.
For anyone else who finds this. The answer is that you'll have to use an Execute C# Code component to do it. For whatever reason you can natively call DateTime.Now, but nothing else to do with DateTime. Call Flow Apps are just C# code as well...So, I can use NOW to get today, but I can't find an easy way to get yesterdays date, any suggestions?
DateTime searchdate = DateTime.Now;
if(searchdate.Hour < 9){
searchdate = searchdate.AddDays(-1);
}
return searchdate.ToString("yyyy-MM-dd");
Founded in 2005, when VoIP was an emerging technology, 3CX has gone on to establish itself as a global leader in business communications.