What is the string format options for minute in DateTime with C#

1 Answer

0 votes
using System;
  
public class Program
{
    public static void Main()
    {
        DateTime dt = new DateTime(2004, 03, 06, 14, 05, 31);
  
        string s = String.Format("{0:m mm}", dt);  
          
        Console.WriteLine(s);
    }
}
  
  
  
  
/*
run:
  
5 05
  
*/

 



answered Mar 27, 2022 by avibootz
edited Mar 27, 2022 by avibootz

Related questions

1 answer 183 views
1 answer 190 views
1 answer 170 views
1 answer 164 views
1 answer 176 views
1 answer 179 views
...