Esempio n. 1
0
        public static string TransferToISO(string datestring, string sourceculture)
        {
            DateTime newdate = X2DateTime.GetCultureDate(datestring, sourceculture);

            if (newdate == DateTime.MinValue)
            {
                return("");
            }
            else
            {
                return(newdate.ToString("yyyyMMddhhmmss"));
            }
        }
Esempio n. 2
0
        /// <summary>
        /// transfer date string to us standard
        /// </summary>
        /// <param name="datestring"></param>
        /// <param name="sourceculture"></param>
        /// <returns></returns>
        public static string TransferToUS(string datestring, string sourceculture)
        {
            DateTime newdate = X2DateTime.GetCultureDate(datestring, sourceculture);

            if (newdate == DateTime.MinValue)
            {
                return("");
            }
            else
            {
                return(X2DateTime.GetCultureString(newdate, "en-US"));
            }
        }
Esempio n. 3
0
        public static long TransferToTicks(string datestring, string sourceculture)
        {
            DateTime newdate = X2DateTime.GetCultureDate(datestring, sourceculture);

            if (newdate == DateTime.MinValue)
            {
                return(0);
            }
            else
            {
                return(newdate.Ticks);
            }
        }