Array of valid Date Formats or Datetime Format


Array of valid Date Format

namespace yourProject.BAL.Utility
{
    public static class Utils
    {  
 public static string[] validDateFormat = new string[]
             {
               "dd-MM-yyyy hh:mm:ss",
              "MM-dd-yyyy hh:mm:ss",
              "yyyy-MM-dd hh:mm:ss",
              "yyyy-dd-MM hh:mm:ss",
              "MM-yyyy-dd hh:mm:ss",
              "dd-yyyy-MM hh:mm:ss",
              "dd/MM/yyyy hh:mm:ss",
              "MM/dd/yyyy hh:mm:ss",
              "yyyy/MM/dd hh:mm:ss",
              "yyyy/dd/MM hh:mm:ss",
              "MM/yyyy/dd hh:mm:ss",
              "dd/yyyy/MM hh:mm:ss",
              "dd.MM.yyyy hh:mm:ss",
              "MM.dd.yyyy hh:mm:ss",
              "yyyy.MM.dd hh:mm:ss",
              "yyyy.dd.MM hh:mm:ss",
              "MM.yyyy.dd hh:mm:ss",
              "dd.yyyy.MM hh:mm:ss",
              "dd/mm/yy",
                 "dd/mm/yyyy",
                 "d/m/yy",
                 "d/m/yyyy",
                 "ddmmyy",
                 "ddmmyyyy",
                 "ddmmmyy",
                 "ddmmmyyyy",
                 "dd-mmm-yy",
                 "dd-mmm-yyyy",
                 "dmmmyy",
                 "dmmmyyyy",
                 "d-mmm-yy",
                 "d-mmm-yyyy",
                 "d-mmmm-yy",
                 "d-mmmm-yyyy",
                 "yymmdd",
                 "yyyymmdd",
                 "yy/mm/dd",
                 "yyyy/mm/dd",
                 "mmddyy",
                 "mmddyyyy",
                 "mm/dd/yy",
                 "mm/dd/yyyy",
                 "mmm-dd-yy",
                 "mmm-dd-yyyy",
                 "yyyy-mm-dd"
            };
}
}

No comments:

Post a comment

Thank You For Your Great Contribution

Featured Post

how to find duplicate item from array using multiple object keys in angular or javascript

 how to find duplicate item from array using multiple object keys There is a way to find based of multiple key find duplicate records in ang...

Popular Posts