Replacing day part in Date with another number in PLSQL

date-formatting, oracle, oracle11g, sql

Solution

trunc(sysdate,'MM') + (x-1)

would do it. `trunc(sysdate,'MM')` returns the first of the month. Then you add however many days you want to get the date that you want.

Problem

i am trying to replace a day part in a date value. say for example ``` select TRUNC(SYSDATE) from dual; ``` Result: 28/11/2014 I wanted to replace only the 28 with another number value(X). So i can arrive the result like X/11/2014. Can you please help me? Thanks in Advance, Murugan.

Original source