示例#1
0
        public static void UpdateJapaneseEra(DateTimeFormatInfo dateTimeFormatInfo, object[,] NewEraInfoParameter)
        {
            var len = NewEraInfoParameter.GetLength(0);

            string[] new_EraNames              = new string[len];
            string[] new_AbbrevEraNames        = new string[len];
            string[] new_AbbrevEnglishEraNames = new string[len];

            for (int i = len - 1; i >= 0; i--)
            {
                new_EraNames[i]              = (string)NewEraInfoParameter.GetValue(i, 0);
                new_AbbrevEraNames[i]        = (string)NewEraInfoParameter.GetValue(i, 1);
                new_AbbrevEnglishEraNames[i] = (string)NewEraInfoParameter.GetValue(i, 2);
            }

            Type dateTimeFormatInfoType = dateTimeFormatInfo.GetType();

            FieldInfo eraNamesFieldInfo = dateTimeFormatInfoType.GetField("m_eraNames", BindingFlags.NonPublic |
                                                                          BindingFlags.Instance |
                                                                          BindingFlags.Static);

            eraNamesFieldInfo.SetValue(dateTimeFormatInfo, new_EraNames);

            FieldInfo abbrevEraNamesFieldInfo = dateTimeFormatInfoType.GetField("m_abbrevEraNames", BindingFlags.NonPublic |
                                                                                BindingFlags.Instance |
                                                                                BindingFlags.Static);

            abbrevEraNamesFieldInfo.SetValue(dateTimeFormatInfo, new_AbbrevEraNames);

            FieldInfo abbrevEnglishEraNamesFieldInfo = dateTimeFormatInfoType.GetField("m_abbrevEnglishEraNames", BindingFlags.NonPublic |
                                                                                       BindingFlags.Instance |
                                                                                       BindingFlags.Static);

            abbrevEnglishEraNamesFieldInfo.SetValue(dateTimeFormatInfo, new_AbbrevEnglishEraNames);
        }
示例#2
0
        public void TestDatePatterns(string cult)
        {
            // Get the properties of an en-US DateTimeFormatInfo object.
            DateTimeFormatInfo dtfi = CultureInfo.GetCultureInfo(cult).DateTimeFormat;
            Type typ = dtfi.GetType();

            PropertyInfo[] props = typ.GetProperties();
            DateTime       value = new DateTime(2021, 5, 26, 11, 35, 0);

            StringBuilder output = new StringBuilder();

            output.AppendFormat("{0,-33} {1} \n{2,-37}Ejemplo: {3}\n",
                                "Nombre patrón:", "Formato", "",
                                "Valor ejemplo");
            foreach (var prop in props)
            {
                // Is this a format pattern-related property?
                if (prop.Name.Contains("Pattern"))
                {
                    string fmt = prop.GetValue(dtfi, null).ToString();
                    output.AppendFormat("{0,-33} {1} \n{2,-37}Ejemplo: {3}\n",
                                        prop.Name + ":", fmt, "",
                                        value.ToString(fmt));
                }
            }
            MessageBox.Show(output.ToString(), "Tabla Patrones fechas " + cult);
        }
示例#3
0
    public static CultureInfo GetPersianCulture()
    {
        const string cultureName = "fa-IR";

        if (_culture == null)
        {
            _culture = new CultureInfo(cultureName);
            DateTimeFormatInfo formatInfo = _culture.DateTimeFormat;
            formatInfo.AbbreviatedDayNames = new[] { "ی", "د", "س", "چ", "پ", "ج", "ش" };
            formatInfo.DayNames            = new[] { "یکشنبه", "دوشنبه", "سه شنبه", "چهار شنبه", "پنجشنبه", "جمعه", "شنبه" };
            var monthNames = new[]
            {
                "فروردین", "اردیبهشت", "خرداد", "تیر", "مرداد", "شهریور", "مهر", "آبان", "آذر", "دی", "بهمن",
                "اسفند",
                ""
            };
            formatInfo.AbbreviatedMonthNames = formatInfo.MonthNames = formatInfo.MonthGenitiveNames = formatInfo.AbbreviatedMonthGenitiveNames = monthNames;
            _culture.DateTimeFormat          = new CultureInfo("en-US").DateTimeFormat;
            Calendar  persianCalendar = new PersianCalendar();
            FieldInfo fieldInfo       = _culture.GetType().GetField("calendar", BindingFlags.NonPublic | BindingFlags.Instance);
            if (fieldInfo != null)
            {
                fieldInfo.SetValue(_culture, persianCalendar);
            }
            FieldInfo info = formatInfo.GetType().GetField("calendar", BindingFlags.NonPublic | BindingFlags.Instance);
            if (info != null)
            {
                info.SetValue(formatInfo, persianCalendar);
            }
            _culture.NumberFormat.NumberDecimalSeparator = "/";
            _culture.NumberFormat.DigitSubstitution      = DigitShapes.NativeNational;
            _culture.NumberFormat.NumberNegativePattern  = 0;
        }
        return(_culture);
    }
示例#4
0
        private static CultureInfo CreatePersianCultureInfo()
        {
            var cultureInfo = new CultureInfo("fa-IR");

            DateTimeFormatInfo formatInfo = cultureInfo.DateTimeFormat;

            formatInfo.AbbreviatedDayNames = new[] { "ی", "د", "س", "چ", "پ", "ج", "ش" };

            formatInfo.DayNames = new[] { "یکشنبه", "دوشنبه", "سه شنبه", "چهار شنبه", "پنجشنبه", "جمعه", "شنبه" };

            var monthNames = new[]
            {
                "فروردین", "اردیبهشت", "خرداد", "تیر", "مرداد", "شهریور", "مهر", "آبان", "آذر", "دی", "بهمن", "اسفند", ""
            };

            formatInfo.AbbreviatedMonthNames      =
                formatInfo.MonthNames             =
                    formatInfo.MonthGenitiveNames =
                        formatInfo.AbbreviatedMonthGenitiveNames =
                            monthNames;

            formatInfo.AMDesignator = "ق.ظ";

            formatInfo.PMDesignator = "ب.ظ";

            formatInfo.ShortDatePattern = "yyyy/MM/dd";

            formatInfo.LongDatePattern = "dddd, dd MMMM,yyyy";

            formatInfo.FirstDayOfWeek = DayOfWeek.Saturday;

            var persianCalendar = new PersianCalendar();

            var fieldInfo = cultureInfo.GetType()
                            .GetField("calendar", BindingFlags.NonPublic | BindingFlags.Instance);

            fieldInfo?.SetValue(cultureInfo, persianCalendar);

            var info = formatInfo.GetType()
                       .GetField("calendar", BindingFlags.NonPublic | BindingFlags.Instance);

            info?.SetValue(formatInfo, persianCalendar);

            cultureInfo.NumberFormat.NumberDecimalSeparator = "/";

            cultureInfo.NumberFormat.DigitSubstitution = DigitShapes.NativeNational;

            cultureInfo.NumberFormat.NumberNegativePattern = 0;

            return(cultureInfo);
        }
示例#5
0
        static PersianDate()
        {
            culture = new CultureInfo("fa-IR");

            DateTimeFormatInfo formatInfo = culture.DateTimeFormat;

            formatInfo.AbbreviatedDayNames = new[] { "ی", "د", "س", "چ", "پ", "ج", "ش" };
            formatInfo.DayNames            = Enum.GetNames(typeof(PersianDayOfWeek));
            string[] monthNames = Enum.GetNames(typeof(PersianMonth)).Concat(new string[1] {
                ""
            }).ToArray();
            formatInfo.AbbreviatedMonthNames         = monthNames;
            formatInfo.MonthNames                    = monthNames;
            formatInfo.MonthGenitiveNames            = monthNames;
            formatInfo.AbbreviatedMonthGenitiveNames = monthNames;
            formatInfo.AMDesignator                  = "ق.ظ";
            formatInfo.PMDesignator                  = "ب.ظ";
            formatInfo.ShortDatePattern              = "yyyy/MM/dd";
            formatInfo.LongDatePattern               = "dddd, dd MMMM,yyyy";
            formatInfo.FirstDayOfWeek                = DayOfWeek.Saturday;

            persianCalendar = new PersianCalendar();

            FieldInfo fieldInfo = culture.GetType().GetField("calendar", BindingFlags.NonPublic | BindingFlags.Instance);

            if (fieldInfo != null)
            {
                fieldInfo.SetValue(culture, persianCalendar);
            }

            FieldInfo info = formatInfo.GetType().GetField("calendar", BindingFlags.NonPublic | BindingFlags.Instance);

            if (info != null)
            {
                info.SetValue(formatInfo, persianCalendar);
            }

            culture.NumberFormat.NumberDecimalSeparator = "/";
            culture.NumberFormat.DigitSubstitution      = DigitShapes.NativeNational;
            culture.NumberFormat.NumberNegativePattern  = 0;

            MaxValue = new PersianDate(9378, 10, 10);
            MinValue = new PersianDate(1, 1, 1);
        }
示例#6
0
        public static CultureInfo GetPersianCulture()
        {
            _Culture = new CultureInfo("fa-IR");
            DateTimeFormatInfo formatInfo = _Culture.DateTimeFormat;

            formatInfo.AbbreviatedDayNames = new[] { "ی", "د", "س", "چ", "پ", "ج", "ش" };
            formatInfo.DayNames            = new[] { "یکشنبه", "دوشنبه", "سه شنبه", "چهار شنبه", "پنجشنبه", "جمعه", "شنبه" };
            var monthNames = new[]
            {
                "فروردین", "اردیبهشت", "خرداد", "تیر", "مرداد", "شهریور", "مهر", "آبان", "آذر", "دی", "بهمن",
                "اسفند",
                ""
            };

            formatInfo.AbbreviatedMonthNames      =
                formatInfo.MonthNames             =
                    formatInfo.MonthGenitiveNames = formatInfo.AbbreviatedMonthGenitiveNames = monthNames;
            formatInfo.AMDesignator     = "ق.ظ";
            formatInfo.PMDesignator     = "ب.ظ";
            formatInfo.ShortDatePattern = "yyyy/MM/dd";
            formatInfo.LongDatePattern  = "dddd, dd MMMM,yyyy";
            formatInfo.FirstDayOfWeek   = DayOfWeek.Saturday;
            System.Globalization.Calendar cal = new PersianCalendar();

            FieldInfo fieldInfo = _Culture.GetType().GetField("calendar", BindingFlags.NonPublic | BindingFlags.Instance);

            if (fieldInfo != null)
            {
                fieldInfo.SetValue(_Culture, cal);
            }

            FieldInfo info = formatInfo.GetType().GetField("calendar", BindingFlags.NonPublic | BindingFlags.Instance);

            if (info != null)
            {
                info.SetValue(formatInfo, cal);
            }

            _Culture.NumberFormat.NumberDecimalSeparator = "/";
            _Culture.NumberFormat.DigitSubstitution      = DigitShapes.NativeNational;
            _Culture.NumberFormat.NumberNegativePattern  = 0;

            return(_Culture);
        }
示例#7
0
    public static void Main()
    {
        // Get the properties of an en-US DateTimeFormatInfo object.
        DateTimeFormatInfo dtfi = CultureInfo.GetCultureInfo("en-US").DateTimeFormat;
        Type typ = dtfi.GetType();

        PropertyInfo[] props = typ.GetProperties();
        DateTime       value = new DateTime(2012, 5, 28, 11, 35, 0);

        foreach (var prop in props)
        {
            // Is this a format pattern-related property?
            if (prop.Name.Contains("Pattern"))
            {
                string fmt = prop.GetValue(dtfi, null).ToString();
                Console.WriteLine("{0,-33} {1} \n{2,-37}Example: {3}\n",
                                  prop.Name + ":", fmt, "",
                                  value.ToString(fmt));
            }
        }
    }
示例#8
0
 internal static string GetDateTimeOffsetPattern(DateTimeFormatInfo dtfi)
 {
     return((string)dtfi?.GetType()?.GetProperty("DateTimeOffsetPattern")?.GetValue(dtfi) ?? "");
 }
        public static string getDateFormat(string variableClass)
        {
            //Thread.CurrentThread.CurrentCulture.ClearCachedData();
            // SystemLanguage currentLanguage = Application.systemLanguage;
            string culturename = Thread.CurrentThread.CurrentUICulture.Name;
            string s           = CultureInfo.CurrentUICulture.Name;
            string ss          = CultureInfo.CurrentUICulture.DisplayName;
            int    sss         = CultureInfo.CurrentUICulture.LCID;
            string tttt        = CultureInfo.CurrentUICulture.EnglishName;
            string t           = CultureInfo.CurrentCulture.Name;
            string tt          = CultureInfo.CurrentCulture.DisplayName;
            int    ttt         = CultureInfo.CurrentCulture.LCID;
            //  string tttt = CultureInfo.CurrentCulture.EnglishName;
            string region = RegionInfo.CurrentRegion.DisplayName;
            // string lang =
            DateTimeFormatInfo dtfi = CultureInfo.GetCultureInfo(culturename).DateTimeFormat;
            Type typ = dtfi.GetType();

            PropertyInfo[] props = typ.GetProperties();
            //DateTime value = new DateTime(2012, 5, 28, 11, 35, 0);
            string shortDatePropName = "";

            foreach (var prop in props)
            {
                // Is this a format pattern-related property?
                if (prop.Name.Contains("ShortDatePattern"))
                {
                    string fmt = prop.GetValue(dtfi, null).ToString();
                    //Console.WriteLine("{0,-33} {1} \n{2,-37}Example: {3}\n",
                    //          prop.Name + ":", fmt, "",
                    //        value.ToString(fmt));
                    // shortDatePropName = prop.Name;
                    //shortDatePropName = value.ToString(fmt);
                    shortDatePropName = fmt;
                }
            }
            //Added by Aaron on 07/25/2021
            //This ensures that by default we show hour, minute and seconds in the data grid
            //This is the default display that can be changed in the UI
            if (variableClass == "POSIXct")
            {
                shortDatePropName = shortDatePropName + " HH:mm:ss";
            }
            string dateformat = "";

            if (shortDatePropName == "MM/dd/y")
            {
                dateformat = "%m/%d/%y";
            }
            if (shortDatePropName == "MM/dd/yyyy")
            {
                dateformat = "%m/%d/%Y";
            }
            if (shortDatePropName == "dd/MM/y")
            {
                dateformat = "%d/%m/%y";
            }
            if (shortDatePropName == "dd/MM/yyyy")
            {
                dateformat = "%d/%m/%Y";
            }
            if (shortDatePropName == "y/MM/dd")
            {
                dateformat = "%y/%m/%d";
            }
            if (shortDatePropName == "yyyy/MM/dd")
            {
                dateformat = "%Y/%m/%d";
            }
            if (shortDatePropName == "y/dd/MM")
            {
                dateformat = "%y/%d/%m";
            }
            if (shortDatePropName == "yyyy/dd/MM")
            {
                dateformat = "%Y/%d/%m";
            }
            if (shortDatePropName == "MM-dd-y")
            {
                dateformat = "%m-%d-%y";
            }
            if (shortDatePropName == "MM-dd-yyyy")
            {
                dateformat = "%m-%d-%Y";
            }
            if (shortDatePropName == "dd-MM-y")
            {
                dateformat = "%d-%m-%y";
            }
            if (shortDatePropName == "dd-MM-yyyy")
            {
                dateformat = "%d-%m-%Y";
            }
            if (shortDatePropName == "y-MM-dd")
            {
                dateformat = "%y-%m-%d";
            }
            if (shortDatePropName == "yyyy-MM-dd")
            {
                dateformat = "%Y-%m-%d";
            }
            if (shortDatePropName == "y-dd-MM")
            {
                dateformat = "%y-%d-%m";
            }
            if (shortDatePropName == "yyyy-dd-MM")
            {
                dateformat = "%Y-%d-%m";
            }
            if (shortDatePropName == "M/dd/y")
            {
                dateformat = "%m/%d/%y";
            }
            if (shortDatePropName == "M/dd/yyyy")
            {
                dateformat = "%m/%d/%Y";
            }
            if (shortDatePropName == "dd/M/y")
            {
                dateformat = "%d/%m/%y";
            }
            if (shortDatePropName == "dd/M/yyyy")
            {
                dateformat = "%d/%m/%Y";
            }
            if (shortDatePropName == "y/M/dd")
            {
                dateformat = "%y/%m/%d";
            }
            if (shortDatePropName == "yyyy/M/dd")
            {
                dateformat = "%Y/%m/%d";
            }
            if (shortDatePropName == "y/dd/M")
            {
                dateformat = "%y/%d/%m";
            }
            if (shortDatePropName == "yyyy/dd/M")
            {
                dateformat = "%Y/%d/%m";
            }
            if (shortDatePropName == "M-dd-y")
            {
                dateformat = "%m-%d-%y";
            }
            if (shortDatePropName == "M-dd-yyyy")
            {
                dateformat = "%m-%d-%Y";
            }
            if (shortDatePropName == "dd-M-y")
            {
                dateformat = "%d-%m-%y";
            }
            if (shortDatePropName == "dd-M-yyyy")
            {
                dateformat = "%d-%m-%Y";
            }
            if (shortDatePropName == "y-M-dd")
            {
                dateformat = "%y-%m-%d";
            }
            if (shortDatePropName == "yyyy-M-dd")
            {
                dateformat = "%Y-%m-%d";
            }
            if (shortDatePropName == "y-dd-M")
            {
                dateformat = "%y-%d-%m";
            }
            if (shortDatePropName == "yyyy-dd-M")
            {
                dateformat = "%Y-%d-%m";
            }
            if (shortDatePropName == "MM/d/y")
            {
                dateformat = "%m/%d/%y";
            }
            if (shortDatePropName == "MM/d/yyyy")
            {
                dateformat = "%m/%d/%Y";
            }
            if (shortDatePropName == "d/MM/y")
            {
                dateformat = "%d/%m/%y";
            }
            if (shortDatePropName == "d/MM/yyyy")
            {
                dateformat = "%d/%m/%Y";
            }
            if (shortDatePropName == "y/MM/d")
            {
                dateformat = "%y/%m/%d";
            }
            if (shortDatePropName == "yyyy/MM/d")
            {
                dateformat = "%Y/%m/%d";
            }
            if (shortDatePropName == "y/d/MM")
            {
                dateformat = "%y/%d/%m";
            }
            if (shortDatePropName == "yyyy/d/MM")
            {
                dateformat = "%Y/%d/%m";
            }
            if (shortDatePropName == "MM-d-y")
            {
                dateformat = "%m-%d-%y";
            }
            if (shortDatePropName == "MM-d-yyyy")
            {
                dateformat = "%m-%d-%Y";
            }
            if (shortDatePropName == "d-MM-y")
            {
                dateformat = "%d-%m-%y";
            }
            if (shortDatePropName == "d-MM-yyyy")
            {
                dateformat = "%d-%m-%Y";
            }
            if (shortDatePropName == "y-MM-d")
            {
                dateformat = "%y-%m-%d";
            }
            if (shortDatePropName == "yyyy-MM-d")
            {
                dateformat = "%Y-%m-%d";
            }
            if (shortDatePropName == "y-d-MM")
            {
                dateformat = "%y-%d-%m";
            }
            if (shortDatePropName == "yyyy-d-MM")
            {
                dateformat = "%Y-%d-%m";
            }
            if (shortDatePropName == "M/d/y")
            {
                dateformat = "%m/%d/%y";
            }
            if (shortDatePropName == "M/d/yyyy")
            {
                dateformat = "%m/%d/%Y";
            }
            if (shortDatePropName == "d/M/y")
            {
                dateformat = "%d/%m/%y";
            }
            if (shortDatePropName == "d/M/yyyy")
            {
                dateformat = "%d/%m/%Y";
            }
            if (shortDatePropName == "y/M/d")
            {
                dateformat = "%y/%m/%d";
            }
            if (shortDatePropName == "yyyy/M/d")
            {
                dateformat = "%Y/%m/%d";
            }
            if (shortDatePropName == "y/d/M")
            {
                dateformat = "%y/%d/%m";
            }
            if (shortDatePropName == "yyyy/d/M")
            {
                dateformat = "%Y/%d/%m";
            }
            if (shortDatePropName == "M-d-y")
            {
                dateformat = "%m-%d-%y";
            }
            if (shortDatePropName == "M-d-yyyy")
            {
                dateformat = "%m-%d-%Y";
            }
            if (shortDatePropName == "d-M-y")
            {
                dateformat = "%d-%m-%y";
            }
            if (shortDatePropName == "d-M-yyyy")
            {
                dateformat = "%d-%m-%Y";
            }
            if (shortDatePropName == "y-M-d")
            {
                dateformat = "%y-%m-%d";
            }
            if (shortDatePropName == "yyyy-M-d")
            {
                dateformat = "%Y-%m-%d";
            }
            if (shortDatePropName == "y-d-M")
            {
                dateformat = "%y-%d-%m";
            }
            if (shortDatePropName == "yyyy-d-M")
            {
                dateformat = "%Y-%d-%m";
            }

            if (shortDatePropName == "MM/dd/y HH:mm:ss")
            {
                dateformat = "%m/%d/%y %H:%M:%S";
            }
            if (shortDatePropName == "MM/dd/yyyy HH:mm:ss")
            {
                dateformat = "%m/%d/%Y %H:%M:%S";
            }
            if (shortDatePropName == "dd/MM/y HH:mm:ss")
            {
                dateformat = "%d/%m/%y %H:%M:%S";
            }
            if (shortDatePropName == "dd/MM/yyyy HH:mm:ss")
            {
                dateformat = "%d/%m/%Y %H:%M:%S";
            }
            if (shortDatePropName == "y/MM/dd HH:mm:ss")
            {
                dateformat = "%y/%m/%d %H:%M:%S";
            }
            if (shortDatePropName == "yyyy/MM/dd HH:mm:ss")
            {
                dateformat = "%Y/%m/%d %H:%M:%S";
            }
            if (shortDatePropName == "y/dd/MM HH:mm:ss")
            {
                dateformat = "%y/%d/%m %H:%M:%S";
            }
            if (shortDatePropName == "yyyy/dd/MM HH:mm:ss")
            {
                dateformat = "%Y/%d/%m %H:%M:%S";
            }
            if (shortDatePropName == "MM-dd-y HH:mm:ss")
            {
                dateformat = "%m-%d-%y %H:%M:%S";
            }
            if (shortDatePropName == "MM-dd-yyyy HH:mm:ss")
            {
                dateformat = "%m-%d-%Y %H:%M:%S";
            }
            if (shortDatePropName == "dd-MM-y HH:mm:ss")
            {
                dateformat = "%d-%m-%y %H:%M:%S";
            }
            if (shortDatePropName == "dd-MM-yyyy HH:mm:ss")
            {
                dateformat = "%d-%m-%Y %H:%M:%S";
            }
            if (shortDatePropName == "y-MM-dd HH:mm:ss")
            {
                dateformat = "%y-%m-%d %H:%M:%S";
            }
            if (shortDatePropName == "yyyy-MM-dd HH:mm:ss")
            {
                dateformat = "%Y-%m-%d %H:%M:%S";
            }
            if (shortDatePropName == "y-dd-MM HH:mm:ss")
            {
                dateformat = "%y-%d-%m %H:%M:%S";
            }
            if (shortDatePropName == "yyyy-dd-MM HH:mm:ss")
            {
                dateformat = "%Y-%d-%m %H:%M:%S";
            }
            if (shortDatePropName == "M/dd/y HH:mm:ss")
            {
                dateformat = "%m/%d/%y %H:%M:%S";
            }
            if (shortDatePropName == "M/dd/yyyy HH:mm:ss")
            {
                dateformat = "%m/%d/%Y %H:%M:%S";
            }
            if (shortDatePropName == "dd/M/y HH:mm:ss")
            {
                dateformat = "%d/%m/%y %H:%M:%S";
            }
            if (shortDatePropName == "dd/M/yyyy HH:mm:ss")
            {
                dateformat = "%d/%m/%Y %H:%M:%S";
            }
            if (shortDatePropName == "y/M/dd HH:mm:ss")
            {
                dateformat = "%y/%m/%d %H:%M:%S";
            }
            if (shortDatePropName == "yyyy/M/dd HH:mm:ss")
            {
                dateformat = "%Y/%m/%d %H:%M:%S";
            }
            if (shortDatePropName == "y/dd/M HH:mm:ss")
            {
                dateformat = "%y/%d/%m %H:%M:%S";
            }
            if (shortDatePropName == "yyyy/dd/M HH:mm:ss")
            {
                dateformat = "%Y/%d/%m %H:%M:%S";
            }
            if (shortDatePropName == "M-dd-y HH:mm:ss")
            {
                dateformat = "%m-%d-%y %H:%M:%S";
            }
            if (shortDatePropName == "M-dd-yyyy HH:mm:ss")
            {
                dateformat = "%m-%d-%Y %H:%M:%S";
            }
            if (shortDatePropName == "dd-M-y HH:mm:ss")
            {
                dateformat = "%d-%m-%y %H:%M:%S";
            }
            if (shortDatePropName == "dd-M-yyyy HH:mm:ss")
            {
                dateformat = "%d-%m-%Y %H:%M:%S";
            }
            if (shortDatePropName == "y-M-dd HH:mm:ss")
            {
                dateformat = "%y-%m-%d %H:%M:%S";
            }
            if (shortDatePropName == "yyyy-M-dd HH:mm:ss")
            {
                dateformat = "%Y-%m-%d %H:%M:%S";
            }
            if (shortDatePropName == "y-dd-M HH:mm:ss")
            {
                dateformat = "%y-%d-%m %H:%M:%S";
            }
            if (shortDatePropName == "yyyy-dd-M HH:mm:ss")
            {
                dateformat = "%Y-%d-%m %H:%M:%S";
            }
            if (shortDatePropName == "MM/d/y HH:mm:ss")
            {
                dateformat = "%m/%d/%y %H:%M:%S";
            }
            if (shortDatePropName == "MM/d/yyyy HH:mm:ss")
            {
                dateformat = "%m/%d/%Y %H:%M:%S";
            }
            if (shortDatePropName == "d/MM/y HH:mm:ss")
            {
                dateformat = "%d/%m/%y %H:%M:%S";
            }
            if (shortDatePropName == "d/MM/yyyy HH:mm:ss")
            {
                dateformat = "%d/%m/%Y %H:%M:%S";
            }
            if (shortDatePropName == "y/MM/d HH:mm:ss")
            {
                dateformat = "%y/%m/%d %H:%M:%S";
            }
            if (shortDatePropName == "yyyy/MM/d HH:mm:ss")
            {
                dateformat = "%Y/%m/%d %H:%M:%S";
            }
            if (shortDatePropName == "y/d/MM HH:mm:ss")
            {
                dateformat = "%y/%d/%m %H:%M:%S";
            }
            if (shortDatePropName == "yyyy/d/MM HH:mm:ss")
            {
                dateformat = "%Y/%d/%m %H:%M:%S";
            }
            if (shortDatePropName == "MM-d-y HH:mm:ss")
            {
                dateformat = "%m-%d-%y %H:%M:%S";
            }
            if (shortDatePropName == "MM-d-yyyy HH:mm:ss")
            {
                dateformat = "%m-%d-%Y %H:%M:%S";
            }
            if (shortDatePropName == "d-MM-y HH:mm:ss")
            {
                dateformat = "%d-%m-%y %H:%M:%S";
            }
            if (shortDatePropName == "d-MM-yyyy HH:mm:ss")
            {
                dateformat = "%d-%m-%Y %H:%M:%S";
            }
            if (shortDatePropName == "y-MM-d HH:mm:ss")
            {
                dateformat = "%y-%m-%d %H:%M:%S";
            }
            if (shortDatePropName == "yyyy-MM-d HH:mm:ss")
            {
                dateformat = "%Y-%m-%d %H:%M:%S";
            }
            if (shortDatePropName == "y-d-MM HH:mm:ss")
            {
                dateformat = "%y-%d-%m %H:%M:%S";
            }
            if (shortDatePropName == "yyyy-d-MM HH:mm:ss")
            {
                dateformat = "%Y-%d-%m %H:%M:%S";
            }
            if (shortDatePropName == "M/d/y HH:mm:ss")
            {
                dateformat = "%m/%d/%y %H:%M:%S";
            }
            if (shortDatePropName == "M/d/yyyy HH:mm:ss")
            {
                dateformat = "%m/%d/%Y %H:%M:%S";
            }
            if (shortDatePropName == "d/M/y HH:mm:ss")
            {
                dateformat = "%d/%m/%y %H:%M:%S";
            }
            if (shortDatePropName == "d/M/yyyy HH:mm:ss")
            {
                dateformat = "%d/%m/%Y %H:%M:%S";
            }
            if (shortDatePropName == "y/M/d HH:mm:ss")
            {
                dateformat = "%y/%m/%d %H:%M:%S";
            }
            if (shortDatePropName == "yyyy/M/d HH:mm:ss")
            {
                dateformat = "%Y/%m/%d %H:%M:%S";
            }
            if (shortDatePropName == "y/d/M HH:mm:ss")
            {
                dateformat = "%y/%d/%m %H:%M:%S";
            }
            if (shortDatePropName == "yyyy/d/M HH:mm:ss")
            {
                dateformat = "%Y/%d/%m %H:%M:%S";
            }
            if (shortDatePropName == "M-d-y HH:mm:ss")
            {
                dateformat = "%m-%d-%y %H:%M:%S";
            }
            if (shortDatePropName == "M-d-yyyy HH:mm:ss")
            {
                dateformat = "%m-%d-%Y %H:%M:%S";
            }
            if (shortDatePropName == "d-M-y HH:mm:ss")
            {
                dateformat = "%d-%m-%y %H:%M:%S";
            }
            if (shortDatePropName == "d-M-yyyy HH:mm:ss")
            {
                dateformat = "%d-%m-%Y %H:%M:%S";
            }
            if (shortDatePropName == "y-M-d HH:mm:ss")
            {
                dateformat = "%y-%m-%d %H:%M:%S";
            }
            if (shortDatePropName == "yyyy-M-d HH:mm:ss")
            {
                dateformat = "%Y-%m-%d %H:%M:%S";
            }
            if (shortDatePropName == "y-d-M HH:mm:ss")
            {
                dateformat = "%y-%d-%m %H:%M:%S";
            }
            if (shortDatePropName == "yyyy-d-M HH:mm:ss")
            {
                dateformat = "%Y-%d-%m %H:%M:%S";
            }

            return(dateformat);
        }