tag:blogger.com,1999:blog-7883247768244567958.post1573100204716078589..comments2023-10-28T08:24:54.296-07:00Comments on Free Database: The Relational Databases Blog: Oracle date functionsDotNetFactshttp://www.blogger.com/profile/10845230539682811461noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-7883247768244567958.post-85121634480176210212009-06-11T02:58:24.017-07:002009-06-11T02:58:24.017-07:00Renvoi toujours le dimanche précédent même si la d...Renvoi toujours le dimanche précédent même si la date du jour (aujourd'hui) est un dimanche.<br /><br />select to_char((sysdate - to_number(to_char(sysdate,'D'))),'DAY dd/MM/yyyy') from dual ;<br /><br />Renvoi le dimanche précédent sauf si la date du jour (aujourd'hui) est un dimanche alors il renvoi la date du jour.<br /> <br />select<br /> case <br /> when to_number(to_char(sysdate,'D')) = 7 then to_char(sysdate,'DAY dd/MM/yyyy') <br /> else to_char(<br /> (sysdate <br /> - <br /> to_number(to_char(sysdate,'D'))<br /> ),'DAY dd/MM/yyyy'<br /> )<br /> end<br />from dual;TEST2https://www.blogger.com/profile/04295336143472279208noreply@blogger.comtag:blogger.com,1999:blog-7883247768244567958.post-50493305240089326202009-06-05T14:18:34.196-07:002009-06-05T14:18:34.196-07:00Hi,
How would I find the date of the previous Sun...Hi,<br /><br />How would I find the date of the previous Sunday before today? <br /><br />thanks!can80nhttps://www.blogger.com/profile/07521168706809254785noreply@blogger.com