How to enter yesterday in box ex- 04/05/2023
I have to enter 04/04/2023 in box. What is expression can we use?
2 Likes
Hi @Zuber_Shaikh ,
Can you confirm which value you have to enter. 04/04/2023 or 03/05/2023.
Input = 04/05/2023
Get yesterday date
Now.AddDays(-1).ToString("dd/MM/yyyy")
Output is 03/05/2023
Get Last month yesterday date from the current date
Now.AddMonths(-1).AddDays(-1).ToString("dd/MM/yyyy")
Output: 03/04/2023
Thanks!
2 Likes