magritton
9/23/2015 - 12:34 AM

This function converts military date and time to normal date and time.

This function converts military date and time to normal date and time.

public static DateTime MilitaryToDateTime(int Military,  string strDate)
    {
        int Hours = Military / 100;
        int Minutes = Military - Hours * 100;
        DateTime Result = DateTime.Parse(strDate);


        Result = Result.AddHours(Hours);
        Result = Result.AddMinutes(Minutes);


        return Result;
    }