Add date to an object before update to table

After reading through the Backendless docs for data insertion, I have not yet figured out how to add a date to an object and see it in the table after persistence. With this example code:

 BackendlessUser currentUser = Backendless.UserService.CurrentUser();
String resultDate = "03/02/1991";
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
 currentUser.setProperty("dateOfBirth", sdf.parse(resultDate));
catch (Exception ex) {
 // ex handling

After the execution of this code, I go and observe for any changes to the user data table but I see no change done to that field. The dateOfBirth field is of DateTIme formatting.
The main question I have is how to add dates to my table using android java?

Once you call the “update” method, you should see the “dateOfBirth” property in the list of User Properties. Have you checked the Users table schema? If you were checking just in the Users table, you might need to reload the page to see the change.

Also, make sure the currentUser object has a real value representing the user.

I have checked the user table, both before and after, and after every api call. I have debugged and stepped through to make sure that currentUser was instantiated and it was. I think otherwise an exception would have been thrown. Is it correct that a string with that format should be passed to the property? Also I was looking at the DATETIME property in the tables empty field. It shows as the image i attached. Since the sdf i set was to ‘dd/MM/yyyy’ and not exactly like what was in the DATETIME field, could this be the issue?


Hi, Dallas.

I’ve tried your sample and it worked fine for me. Are you sure that you’re checking the right user?
Please check if “updated” field for target user changes after running your code. If it doesn’t - debug your code again and verify that objectId of “currentUser” is the same as you see on the console.