Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Silvana.

Asked: April 06, 2017 - 7:31 pm UTC

Last updated: April 07, 2017 - 5:56 am UTC

Version: 9.2

Viewed 10K+ times! This question is

You Asked

Using PO_DT field in Oracle, Trying to get the First Date of week based on value of PO_DT.

and Connor said...

You can truncate a date column to the week, eg

SQL> alter session set nls_date_format = 'DAY DD-MON-YYYY';

Session altered.

SQL> select trunc(sysdate,'IW') from dual;

TRUNC(SYSDATE,'IW')
---------------------
MONDAY    03-APR-2017



Note that depending on your country/territory settings the "first" day of the week might not be deemed to be a Monday, so double check that as well.

Is this answer out of date? If it is, please let us know via a Comment