fork(2) download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. DateTime dt = new DateTime(2012, 12, 12);
  8. string Format = "yyyyMMdd";
  9. string yourstring = String.Format("{0:" + Format + "}", dt);
  10. Console.WriteLine(yourstring);
  11. }
  12. }
Success #stdin #stdout 0.04s 33880KB
stdin
Standard input is empty
stdout
20121212