System.Globalization.CCFixed.ToDateTime C# (CSharp) Метод

ToDateTime() публичный статический Метод

The method computes the T:System.DateTime from a fixed day number.
public static ToDateTime ( int date ) : System.DateTime
date int A integer representing the fixed day number. ///
Результат System.DateTime
	public static System.DateTime ToDateTime(int date) {
		long ticks = (date - 1) * System.TimeSpan.TicksPerDay;
		return new System.DateTime(ticks);
	}

Same methods

CCFixed::ToDateTime ( int date, int hour, int minute, int second, double milliseconds ) : System.DateTime

Usage Example

        /// <summary>Returns a <see cref="T:System.DateTime" /> that is set to the specified date, time, and era.</summary>
        /// <returns>A <see cref="T:System.DateTime" /> that is set to the specified date and time in the current era.</returns>
        /// <param name="year">An integer from 1 through 9378 that represents the year. </param>
        /// <param name="month">An integer from 1 through 12 that represents the month. </param>
        /// <param name="day">An integer from 1 through 31 that represents the day. </param>
        /// <param name="hour">An integer from 0 through 23 that represents the hour. </param>
        /// <param name="minute">An integer from 0 through 59 that represents the minute. </param>
        /// <param name="second">An integer from 0 through 59 that represents the second. </param>
        /// <param name="millisecond">An integer from 0 through 999 that represents the millisecond. </param>
        /// <param name="era">An integer from 0 through 1 that represents the era. </param>
        /// <exception cref="T:System.ArgumentOutOfRangeException">
        ///   <paramref name="year" />, <paramref name="month" />, <paramref name="day" />, <paramref name="hour" />, <paramref name="minute" />, <paramref name="second" />, <paramref name="millisecond" />, or <paramref name="era" /> is outside the range supported by this calendar.</exception>
        public override DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era)
        {
            this.M_CheckYMDE(year, month, day, ref era);
            base.M_CheckHMSM(hour, minute, second, millisecond);
            int date = this.fixed_from_dmy(day, month, year);

            return(CCFixed.ToDateTime(date, hour, minute, second, (double)millisecond));
        }
All Usage Examples Of System.Globalization.CCFixed::ToDateTime