<?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: Get Weekday from Date in CDS View using Eclipse in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-weekday-from-date-in-cds-view-using-eclipse/m-p/12223722#M1983817</link>
    <description>&lt;P&gt;Hi Pavan, &lt;/P&gt;&lt;P&gt;Will check this code as well. However, the above code mentioned by Sandro is working as expected.&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
    <pubDate>Mon, 14 Sep 2020 09:15:13 GMT</pubDate>
    <dc:creator>former_member686194</dc:creator>
    <dc:date>2020-09-14T09:15:13Z</dc:date>
    <item>
      <title>Get Weekday from Date in CDS View using Eclipse</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-weekday-from-date-in-cds-view-using-eclipse/m-p/12223717#M1983812</link>
      <description>&lt;P&gt;Derive the weekday based on the date.&lt;/P&gt;
  &lt;P&gt;Sunday = 1&lt;/P&gt;
  &lt;P&gt;Monday = 2&lt;/P&gt;
  &lt;P&gt;Tuesday = 3&lt;/P&gt;
  &lt;P&gt;Wednesday = 4&lt;/P&gt;
  &lt;P&gt;Thursday = 5&lt;/P&gt;
  &lt;P&gt;Friday = 6&lt;/P&gt;
  &lt;P&gt;Saturday = 7&lt;/P&gt;
  &lt;P&gt;if date is 12/31/2019 i.e Tuesday, output should be '&lt;STRONG&gt;3&lt;/STRONG&gt;'&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2020 14:15:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-weekday-from-date-in-cds-view-using-eclipse/m-p/12223717#M1983812</guid>
      <dc:creator>former_member686194</dc:creator>
      <dc:date>2020-09-07T14:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: Get Weekday from Date in CDS View using Eclipse</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-weekday-from-date-in-cds-view-using-eclipse/m-p/12223718#M1983813</link>
      <description>&lt;P&gt;Something like that (ABAP CDS):&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MOD( DATS_DAYS_BETWEEN( CAST( '00010102' AS abap.dats ) , yourdate ) , 7 ) + 1&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;NB: 0001/01/02 was a Sunday.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2020 17:20:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-weekday-from-date-in-cds-view-using-eclipse/m-p/12223718#M1983813</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-09-07T17:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: Get Weekday from Date in CDS View using Eclipse</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-weekday-from-date-in-cds-view-using-eclipse/m-p/12223719#M1983814</link>
      <description>&lt;P&gt;Hi Tendulkar,&lt;/P&gt;&lt;P&gt;Please check below sample CDS view definition  which gives exactly the result what you are expecting&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;@AbapCatalog.sqlViewName: 'ZV_RND_VIEW'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'A Sample CDS View'
define view ZI_RND_VIEW 
with parameters p_date: abap.dats
as select from I_CalendarDate {
    //I_CalendarDate 
    CalendarDate, 
    CalendarYear, 
    CalendarMonth,  
    WeekDay
} where CalendarDate = $parameters.p_date;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;the weekday is the field which gives you the number of the day&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Pavan Bhamidipati&lt;/P&gt;</description>
      <pubDate>Wed, 09 Sep 2020 08:06:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-weekday-from-date-in-cds-view-using-eclipse/m-p/12223719#M1983814</guid>
      <dc:creator>bpawanchand</dc:creator>
      <dc:date>2020-09-09T08:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: Get Weekday from Date in CDS View using Eclipse</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-weekday-from-date-in-cds-view-using-eclipse/m-p/12223720#M1983815</link>
      <description>&lt;P&gt;If it's solved, can you tell us how you solved? Thx.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Sep 2020 18:39:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-weekday-from-date-in-cds-view-using-eclipse/m-p/12223720#M1983815</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-09-13T18:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: Get Weekday from Date in CDS View using Eclipse</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-weekday-from-date-in-cds-view-using-eclipse/m-p/12223721#M1983816</link>
      <description>&lt;P&gt;Hello Sandra,&lt;BR /&gt;Greetings.&lt;BR /&gt;Sorry  for replying late.&lt;/P&gt;&lt;P&gt;I implemented the above code and it worked. Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 09:13:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-weekday-from-date-in-cds-view-using-eclipse/m-p/12223721#M1983816</guid>
      <dc:creator>former_member686194</dc:creator>
      <dc:date>2020-09-14T09:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Get Weekday from Date in CDS View using Eclipse</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-weekday-from-date-in-cds-view-using-eclipse/m-p/12223722#M1983817</link>
      <description>&lt;P&gt;Hi Pavan, &lt;/P&gt;&lt;P&gt;Will check this code as well. However, the above code mentioned by Sandro is working as expected.&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 09:15:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-weekday-from-date-in-cds-view-using-eclipse/m-p/12223722#M1983817</guid>
      <dc:creator>former_member686194</dc:creator>
      <dc:date>2020-09-14T09:15:13Z</dc:date>
    </item>
  </channel>
</rss>

