Support Topics Documentation Slack YouTube Blog

Date format


(Sergey Smirnov) #1

I’m trying to save object with date “03.03.2014”, but I’m getting an exception:

"Error message - Invalid date format for property eventdate"

Could you help me to resolve this issue, please?


(Erick Navarro) #2

Greetings

I just read this http://backendless.com/documentation/data/android/data_search_with_dates.htm in hopes to get some help with the correct formatting for dates, but doesnt work.

If I send this “06/20/1986 00:00:00” or this “06/20/1986 00:00:00 GMT-0200” I get an error, with null error code and with message “Unable to adapt response to objectName”. But if I send this “Dec.20.1986” wich is indicated as valid in the previous link I get “Invalid date format for property…”

Can you please tell us in a simple manner how to save a date? Im being arround this since yesterday!


(Marcio Prudencio) #3

Hi Guys, my Order function crashed due a Date Format issue. Was accepting the format before I’m using moment.js to format all dates. Has something changed?

=> moment(this.state.deliveryDate).format(“DD/MM/YYYY HH:mm:ss”)

Date formated (like created): 13/01/2019 01:13:36
response error: an error has occurred Invalid date format for property deliveryDate

I appreciate the support, thanks.


(Sergey Chupov) #4

Hello Marcio,

There were no changes on our side concerning the date format handling. Are you sure there were no changes in your code, or in the libraries or library versions you use? Also, can you try to use this format via REST, e.g. in our REST console? This will give us a clue on whether it’s an issue on the server or in the client code.


(Marcio Prudencio) #5

Thanks Sergey, turns out I found the problem in the code, I was trying to format the date for 2nd time at the parent component and as result the final date (after the console.log from child component) was printing undefined.

Thanks for your help! Regards