Skip to Content
avatar image
Former Member

Issue - Date save in database with decrements by one

Hi,

Actually I am using sap.m.DatePicker control in my application. Issue is that when I send the date to the database it automatically decrements the date by one and save the decremented date in database. I am using xsjs for sending the date value in database

Below is the code for sending data to xsjs and xsjs furtur send the data to database

"effective_from": sap.ui.getCore().byId("effectiveFromInput").getDateValue()

Please suggest something. Thanks in Advance.

Thanks & Regards

Somdutt

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jun 01, 2017 at 04:09 PM

    the issue here is that the date that you are passing back (or even reading from) is saved with the offset from your time zone.. please make sure that the time offset (from GMT) is the correct date.. .and if so.. you can add the offset when reading into your UI.

    hope this is what you are seeing

    Add comment
    10|10000 characters needed characters exceeded