<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Oracle : decode on date value in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/oracle-decode-on-date-value/m-p/3267855#M888963</link>
    <description>Something like :&lt;BR /&gt;select sysdate - &lt;BR /&gt;(DECODE(TRIM(TO_CHAR((SYSDATE - 1),'Day')), 'Sunday', 2,'Saturday', 1,0) + 1)&lt;BR /&gt;from dual&lt;BR /&gt;&lt;BR /&gt;this will  be yesterday unless yesterday is Sunday or Saturday.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Jean-Luc</description>
    <pubDate>Wed, 05 May 2004 05:57:37 GMT</pubDate>
    <dc:creator>Jean-Luc Oudart</dc:creator>
    <dc:date>2004-05-05T05:57:37Z</dc:date>
    <item>
      <title>Oracle : decode on date value</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/oracle-decode-on-date-value/m-p/3267853#M888961</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I need to get the last worked day, if current day is monday, then friday.&lt;BR /&gt;&lt;BR /&gt;This doesn't work :&lt;BR /&gt;&lt;BR /&gt;select decode( to_char(to_date('030504','DDMMRR'),'DAY'),&lt;BR /&gt;        'MONDAY', next_day(sysdate-6,'FRIDAY'),&lt;BR /&gt;        sysdate-1) &lt;BR /&gt;&lt;BR /&gt;any idea ?&lt;BR /&gt;&lt;BR /&gt;Cheers &lt;BR /&gt;&lt;BR /&gt;Nicolas</description>
      <pubDate>Wed, 05 May 2004 05:13:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/oracle-decode-on-date-value/m-p/3267853#M888961</guid>
      <dc:creator>Nicolas Dumeige</dc:creator>
      <dc:date>2004-05-05T05:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: Oracle : decode on date value</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/oracle-decode-on-date-value/m-p/3267854#M888962</link>
      <description>Hi Nicolas:&lt;BR /&gt;If you notice the output of&lt;BR /&gt;to_char(to_date('030504','DDMMRR'),'DAY') &lt;BR /&gt;is not 'MONDAY' but 'MONDAY---'.&lt;BR /&gt;Now if you trim the output of this like this&lt;BR /&gt;trim(to_char(to_date('030504','DDMMRR'),'DAY')), it will work.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;Dilip</description>
      <pubDate>Wed, 05 May 2004 05:47:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/oracle-decode-on-date-value/m-p/3267854#M888962</guid>
      <dc:creator>Dilip Kumar_4</dc:creator>
      <dc:date>2004-05-05T05:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: Oracle : decode on date value</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/oracle-decode-on-date-value/m-p/3267855#M888963</link>
      <description>Something like :&lt;BR /&gt;select sysdate - &lt;BR /&gt;(DECODE(TRIM(TO_CHAR((SYSDATE - 1),'Day')), 'Sunday', 2,'Saturday', 1,0) + 1)&lt;BR /&gt;from dual&lt;BR /&gt;&lt;BR /&gt;this will  be yesterday unless yesterday is Sunday or Saturday.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Jean-Luc</description>
      <pubDate>Wed, 05 May 2004 05:57:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/oracle-decode-on-date-value/m-p/3267855#M888963</guid>
      <dc:creator>Jean-Luc Oudart</dc:creator>
      <dc:date>2004-05-05T05:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: Oracle : decode on date value</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/oracle-decode-on-date-value/m-p/3267856#M888964</link>
      <description>Thank you guys !</description>
      <pubDate>Wed, 05 May 2004 07:23:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/oracle-decode-on-date-value/m-p/3267856#M888964</guid>
      <dc:creator>Nicolas Dumeige</dc:creator>
      <dc:date>2004-05-05T07:23:58Z</dc:date>
    </item>
  </channel>
</rss>

