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 post formdata or http.context.form data from angular 6 to asp.net mvc web api or api using Token based authentication with header

how to post formdata or http.context.form data from angular 6 to asp.net mvc web api or api using Token based authentication with header  ...

Popular Posts