I have a datevariable, I would like to have convert it to first day of its monh,
- Eg: 10/10/2010 -> 01/10/2010
- Eg: 31/07/2010 -> 01/07/2010
Advertisement
Answer
According to http://psoug.org/reference/date_func.html, this should work a dandy…
SELECT TRUNC(yourDateField, 'MONTH') FROM yourTable