Issue with Formatting Date and Handling Date-Only Values in Sequelize #13
-
Hello, I'm encountering an issue with formatting dates and handling date-only values in Sequelize. Despite defining the Here's a snippet of the relevant code:
Could someone guide how to properly insert date-only values into an SQL database via Sequelize? For instance, if the input date is in the format 2024-04-15 but the database shows 2024-04-15 00:00:00, I aim to format it as 2024-04-15. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi, I also faced, I resolved it by following these steps: Remove
Then Save. |
Beta Was this translation helpful? Give feedback.
Hi, I also faced, I resolved it by following these steps:
Remove
assign_date
from Sequelize schema. Validate it as required in the Flutter form.Format date in backend: After receiving the date, format it in the backend before insertion using below code snippet:
Then Save.
I believe it will work.