public static System.DateTime?DateRelativeBaseDate(System.DateTime? original, System.DateTime? reference) { if (original != null && reference != null) { var date = (System.DateTime)original; var refDate = (System.DateTime)reference; var deltaDate = date.Subtract(refDate); var newDate = BaseDate.Add(deltaDate); return(newDate); } return(null); }
public static System.DateTime?DateRelativeBaseDate(System.DateTime? original, System.DateTime? reference) { if (original != null && reference != null) { System.DateTime date = (System.DateTime)original; System.DateTime refDate = (System.DateTime)reference; TimeSpan deltaDate = date.Subtract(refDate); System.DateTime newDate = BaseDate.Add(deltaDate); return(newDate); } else { return(null); } }