UrlHistoryLibrary/Win32api.cs
/// <summary>
/// Converts a DateTime to file time format.
/// </summary>
/// <param name="datetime">DateTime structure</param>
/// <returns>FILETIME structure</returns>
Converts a DateTime to file time format.
Converts a DateTime to file time format .
public static FILETIME DateTimeToFileTime(DateTime datetime)
		{
			SYSTEMTIME st = new SYSTEMTIME();
			st.Year = (short)datetime.Year;
			st.Month = (short)datetime.Month;
			st.Day = (short)datetime.Day;
			st.Hour = (short)datetime.Hour;
			st.Minute = (short)datetime.Minute;
			st.Second = (short)datetime.Second;
			st.Milliseconds = (short)datetime.Millisecond;
			FILETIME filetime;
			SystemTimeToFileTime(ref st, out filetime);
			return filetime;
		}
public static FILETIME DateTimeToFileTime ( DateTime datetime ) { SYSTEMTIME st = new SYSTEMTIME ( ) ; st . Year = ( short ) datetime . Year ; st . Month = ( short ) datetime . Month ; st . Day = ( short ) datetime . Day ; st . Hour = ( short ) datetime . Hour ; st . Minute = ( short ) datetime . Minute ; st . Second = ( short ) datetime . Second ; st . Milliseconds = ( short ) datetime . Millisecond ; FILETIME filetime ; SystemTimeToFileTime ( ref st , out filetime ) ; return filetime ; }
Converts a DateTime to file time format.
Converts a DateTime to file time format .
None
datetime
DateTime
None