I have a table of imported data that contains dates as a string that I want to convert in a backend workflow.
It’s currently in the format
yyyy-mm-ddTHH;MM;SS and looks like this:
2022-09-01T14:14:00
I’m making other changes to the data record by record recursively so can add a step to my Make Changes to Thing and create a proper date field to store this. Just not sure of the right approach.
One possible solution was Regex which I’m new to.
This gives me what I need but this is then a list of 6 things. How do I match these items to each element in the Date/Time field?
Would prefer convert to this directly rather than send to a plugin as Im running this over a couple of thousand records but any suggestions are welcome.
I think that if you edit your text to match the format above, Bubble will understand the text as date and you will be able to save it as date. Remember that you need to enable this feature in your editor (Settings → Versions).
Here’s the solution for anyone interested. I’ve left Regex in the end and used Data converter plugin - Text to Date converter as below. Weirdly their instructions don’t mention time so I figured it only did the date part of the time calc (yes I know date type has day and time) .
I also tried @rpetribu ‘s suggestion using the timezone as an option but this gave me weird results Being GMT+10 if I entered my timezone this sent me forward 20 hours, I also tried GMT and GMT-10 but it also didn’t’ work so in the end I’ve rounded down and will just watch it when we switch to daylight savings.
I ended up using this
and the process works well in a backend workflow