You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How we can use date time converter to load correct date time in User Interface from data object?

Received Response
60
Views
15
Comments
edited Nov 11, 2018 7:19AM in Visual Builder 15 comments

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?

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!