Contributor
2096 Points
1040 Posts
Jan 21, 2020 06:44 AM|Khuram.Shahzad|LINK
Use DateTime.Now.ToString("yyyy/MM/dd")
DateTime.Now.ToString("yyyy/MM/dd")
https://docs.microsoft.com/en-us/dotnet/api/system.datetime.tostring?redirectedfrom=MSDN&view=netframework-4.8#System_DateTime_ToString_System_String_
using System; public class Program{ public static void Main() { Console.WriteLine(DateTime.Now.ToString("yyyy/MM/dd")); }} //Output 2020/01/21
Contributor
2096 Points
1040 Posts
Re: convert DataTable entire column to YYYY/MM/DD format without for-loop from YYYY-MM-DDT00:00:0...
Jan 21, 2020 06:44 AM|Khuram.Shahzad|LINK
Use
DateTime.Now.ToString("yyyy/MM/dd")
https://docs.microsoft.com/en-us/dotnet/api/system.datetime.tostring?redirectedfrom=MSDN&view=netframework-4.8#System_DateTime_ToString_System_String_