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

Sql dynamic query With Join And search using like query with multiple column

Sql dynamic query With Join And search using like query with multiple column declare @keyword varchar(100) DECLARE @sqlCommand va...

Popular Posts