How we can use date time converter to load correct date time in User Interface from data object?
Summary
How we can use date time converter to load correct date time in User Interface from data object?Content
Q1: We are getting wrong time displayed on UI when using oj-input-date-time Pattern MM-dd-yyyy hh:mm a in all of our table fields.
Time in UI : 11-10-2018 05:43 PM (Wrong)
Time in DB: Nov 10, 2018 11:13 PM (Correct)
Code to insert date in DB:
//Creating javascript date object and building rest payload as shown below:
var eDate=new Date();
var updateSObj = {
"id": sid,
"status": "Closed",
"surveyEndDate": eDate
};
Why time is showing wrong in UI
How we can use date time converter to load correct date time in User Interface from data object?
Tagged:
0