0

A datatable which have datetime column and have value like 2019/02/16 04:46 Now i want to set minute part 00 like 2019/02/16 04:00. How i can achieve this?

Thanks in advance.

  • Hi! Welcome to stackoverflow. Have you tried solving this yourself? If so, edit your code into the question. If not, do that first and come back when you have. Also the question is unclear, do you want just to set the minutes in datetime-object to 0 or do you just want to convert datetime to string that is showing the minutes as 0? – Esko Apr 17 '19 at 09:25
  • Hi, Yes, i tried to but could not solve. Sorry if question is not clear. yes i want to just set the minutes in datatime-object to 0 – Devendra Pandey Apr 17 '19 at 09:50

1 Answers1

0

Do like this

DateTime.Now.ToString("yyyy/MM/dd hh:" & "00")

https://dotnetfiddle.net/0xrVQO

Faiz Infy
  • 91
  • 6