Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Need to convert datetime containg '/' to '-' format
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { //Your code goes here String dtApprovedAt = "10/23/2018 2:33:18 AM"; DateTime parsedDate = DateTime.ParseExact(dtApprovedAt.ToString(), "M/dd/yyyy h:mm:ss tt", System.Globalization.CultureInfo.InvariantCulture); String parsedStr = parsedDate.ToString("MM-dd-yyyy hh:mm").ToString(); Console.WriteLine(parsedStr); ; } } }
run
|
edit
|
history
|
help
1
sdfghjtrefdc v
Order of Ops Decimals 5.1 (changed result.ToString(fmt2))
Matrix Main Diagonal
числата от 1 до 20
Problem Name_single_digi
1 to n
Stuff
input
dfdfd
Compress in C#