Last log applied/received - oracle database script

Last log applied/Received - Oracle Database Script.

SELECT 'Last Log applied : ' Logs,
                             to_char(next_time, 'DD-MON-YY:HH24:MI:SS') TIME
FROM v$archived_log
WHERE sequence# =
    (SELECT max(sequence#)
     FROM v$archived_log
     WHERE applied='YES')
UNION
SELECT 'Last Log received : ' Logs,
                              to_char(next_time, 'DD-MON-YY:HH24:MI:SS') TIME
FROM v$archived_log
WHERE sequence# =
    (SELECT max(sequence#)
     FROM v$archived_log);