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 Dynamic Upload multiple files with extra detail of model in asp.net core

 How To Dynamic Upload multiple files with extra detail of model in asp.net core  1). firstly create Model File  namespace MyModel {     pub...

Popular Posts