Date and time formats are stored separately as options.
Use get_option() to retrieve the value.
get_option()
E.g.
$date_format = get_option( 'date_format' ); // e.g. "F j, Y"$time_format = get_option( 'time_format' ); // e.g. "H:i:s"