Hi
DateTime frDate = Utility.CurrentDateTime().AddMonths(-1);
frDate = Convert.ToDateTime(frDate).ToString("dd-MM-yyyy");
Thanks
Hi
DateTime frDate = Utility.CurrentDateTime().AddMonths(-1);
frDate = Convert.ToDateTime(frDate).ToString("dd-MM-yyyy");
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Uday DodiyaPosted Sep 21, 2022, 7:19 AM
Hi Ramco,
Try Following
Solution 1
Solution 2
Uday DodiyaPosted Sep 21, 2022, 7:42 AM
Hi ramco,
In datetime datatype its default format is dd/MM/yyyy 00:00:00
we can get dd-MM-yyyy as string as follows
Solution 1
Solution 2
You can get your date format "strfrDate" variable
Ramco RamcoPosted Sep 21, 2022, 7:31 AM
Hi Uday
I want frDate only in Date format dd-MM-yyyy .
Current it is showing time also with 00:00;00
Thanks