<?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>Question Re: Sapui5 one before day problem in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/sapui5-one-before-day-problem/qaa-p/533864#M109098</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;Before sending date value to the oData you have to format it in format as "YYYY-MM-DDTHH:MM:SS". Use below formatter to do this. Passing date object to the odata cause this issue.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;// format date for create
dateFormat:function(value) {
	if(value == null){
		return null;
	}
    	var _smonth = value.getMonth() + 1;
	var _sdate = value.getDate();
	if (_smonth.toString().length &amp;lt; 2) {
		_smonth = "0" + _smonth.toString();
	}
	if (_sdate.toString().length &amp;lt; 2) {
		_sdate = "0" + _sdate.toString();
	}
    	var	formatDate = value.getFullYear()	+ '-' + _smonth + '-' + _sdate + "T00:00:00";
	return formatDate;
},
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 20 Dec 2017 14:15:00 GMT</pubDate>
    <dc:creator>irfan_gokak</dc:creator>
    <dc:date>2017-12-20T14:15:00Z</dc:date>
    <item>
      <title>Sapui5 one before day problem</title>
      <link>https://community.sap.com/t5/technology-q-a/sapui5-one-before-day-problem/qaq-p/533863</link>
      <description>&lt;P&gt;var sToday = new Date(); //today// example : 20.12.2017&lt;/P&gt;
  &lt;P&gt;this.getView().byId("mesaiTbdPicker").setDateValue(sToday); // set today to datepicker //20.12.2017&lt;/P&gt;
  &lt;P&gt;and I sending this data.But i looking data in abap date looking 1 before day. //19.12.2017&lt;/P&gt;
  &lt;P&gt;I tried this but not worked;&lt;/P&gt;
  &lt;P&gt;var sToday = new Date();&lt;/P&gt;
  &lt;P&gt;sToday = sToday + 1;&lt;/P&gt;
  &lt;P&gt;Please help.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 11:12:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sapui5-one-before-day-problem/qaq-p/533863</guid>
      <dc:creator>former_member489109</dc:creator>
      <dc:date>2017-12-20T11:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: Sapui5 one before day problem</title>
      <link>https://community.sap.com/t5/technology-q-a/sapui5-one-before-day-problem/qaa-p/533864#M109098</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;Before sending date value to the oData you have to format it in format as "YYYY-MM-DDTHH:MM:SS". Use below formatter to do this. Passing date object to the odata cause this issue.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;// format date for create
dateFormat:function(value) {
	if(value == null){
		return null;
	}
    	var _smonth = value.getMonth() + 1;
	var _sdate = value.getDate();
	if (_smonth.toString().length &amp;lt; 2) {
		_smonth = "0" + _smonth.toString();
	}
	if (_sdate.toString().length &amp;lt; 2) {
		_sdate = "0" + _sdate.toString();
	}
    	var	formatDate = value.getFullYear()	+ '-' + _smonth + '-' + _sdate + "T00:00:00";
	return formatDate;
},
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Dec 2017 14:15:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sapui5-one-before-day-problem/qaa-p/533864#M109098</guid>
      <dc:creator>irfan_gokak</dc:creator>
      <dc:date>2017-12-20T14:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Sapui5 one before day problem</title>
      <link>https://community.sap.com/t5/technology-q-a/sapui5-one-before-day-problem/qaa-p/533865#M109099</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;In addition to handling it on the &lt;A href="https://blogs.sap.com/2013/04/28/working-with-odata-dates/"&gt;front-end&lt;/A&gt; (to add on the point already made), you can add a day on the back-end &lt;A href="http://bit.ly/2B8B4O6" target="_blank"&gt;ABAP side&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 15:41:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sapui5-one-before-day-problem/qaa-p/533865#M109099</guid>
      <dc:creator>iftah_peretz</dc:creator>
      <dc:date>2017-12-20T15:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: Sapui5 one before day problem</title>
      <link>https://community.sap.com/t5/technology-q-a/sapui5-one-before-day-problem/qaa-p/533866#M109100</link>
      <description>&lt;P&gt;it may not be a problem, the browser is showing local time, the abap side is showing server time, &lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 16:39:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sapui5-one-before-day-problem/qaa-p/533866#M109100</guid>
      <dc:creator>junwu</dc:creator>
      <dc:date>2017-12-20T16:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: Sapui5 one before day problem</title>
      <link>https://community.sap.com/t5/technology-q-a/sapui5-one-before-day-problem/qaa-p/533867#M109101</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;I used abap code it elsewhere.So I can not change it there.But the problem is solved by itself.I didntunderstand. 2-3 hour after i checked code problem solved.

Thanks for answer.



&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Dec 2017 18:18:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sapui5-one-before-day-problem/qaa-p/533867#M109101</guid>
      <dc:creator>former_member489109</dc:creator>
      <dc:date>2017-12-20T18:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Sapui5 one before day problem</title>
      <link>https://community.sap.com/t5/technology-q-a/sapui5-one-before-day-problem/qaa-p/533868#M109102</link>
      <description>&lt;P&gt;Hi Irfan,&lt;/P&gt;
  &lt;P&gt;I tryed your code but not worked. Check this. (this.dateFormat your format style.) // 21.12.2017 true value&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/97983-tarih-sorunu.png" /&gt;&lt;/P&gt;
  &lt;P&gt;Chek here. One before day. // 20.12.2017 false code.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/97984-tarihsorn2.png" /&gt;&lt;/P&gt;
  &lt;P&gt;please help.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 11:54:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sapui5-one-before-day-problem/qaa-p/533868#M109102</guid>
      <dc:creator>former_member489109</dc:creator>
      <dc:date>2017-12-21T11:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: Sapui5 one before day problem</title>
      <link>https://community.sap.com/t5/technology-q-a/sapui5-one-before-day-problem/qaa-p/533869#M109103</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;var sPath = "/MainSet?$filter=Pernr eq '"+this.pernr+"' and 'Tarih eq datetime'"+dDate+"'";
// After this make odata call&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Dec 2017 17:03:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sapui5-one-before-day-problem/qaa-p/533869#M109103</guid>
      <dc:creator>irfan_gokak</dc:creator>
      <dc:date>2017-12-21T17:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: Sapui5 one before day problem</title>
      <link>https://community.sap.com/t5/technology-q-a/sapui5-one-before-day-problem/qaa-p/533870#M109104</link>
      <description>&lt;P&gt;You have to play with the timezone such as CET to get the correct date.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 22:19:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sapui5-one-before-day-problem/qaa-p/533870#M109104</guid>
      <dc:creator>Joseph_BERTHE1</dc:creator>
      <dc:date>2017-12-21T22:19:10Z</dc:date>
    </item>
  </channel>
</rss>

