Hi
I have Date field& i want to display only Date format not time
Thanks
Hi
I have Date field& i want to display only Date format not time
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.
Tuhin PaulPosted Apr 4, 2023, 3:37 AM
DateTime.Now gets the current date and time, and then the ToString() method is called with the format string "yyyy-MM-dd". This format string specifies that only the year, month, and day parts of the date should be displayed, separated by dashes.
Tuhin PaulPosted Apr 4, 2023, 3:36 AM
In C#, you can use the
ToString()method with a format string to display only the date part of aDateTimefield.