@SanduCuragau wrote:
I know there are docs for this and many posts, but I really can’t seem to get it right, I wouldn’t ask for help without trying for at least 2 hours myself
ok so I made this table in sqlite and i have it’s crud developed already too, it’s meant to keep appointments, which mainly has a day, a starting hour and a ending hour, meanwhile from what I researched I ended up creating those columns as TEXT and inserting ISO strings for all of them, so if I needed the day, I would just insert a ISO string which would also take the time with it but I would ignore it later, same with time, I would send a ISO string, which would include the day month and year, which I would ignore later and only use the time
1- I dont believe this is the best approach but this is what I found people using so I decided to use it myself
2- even if it isnt, how would I go about getting it done this way, how do I extract what I want from the strings?So here are the objects
And after getting all the appointments from the database as shown above, I tried to format them using moment js
and then I show them in html by running the appointments array and creating cards
Thing is, after running the app the dates and hours on the page are still shown as the ISO strings and aren’t formatted at all, I’ve tried formatting them in a couple of different ways but nothing has worked
It’s my first time dealing with dates overall, so yeah I really don’t know what I’m doing, I could reallyyyy use some advice, thanks
Posts: 1
Participants: 1