I have a date/time picker component set to style Date and Time Picker. I then have a button set to a Custom Action of posting the component to an external database on Xano. The problem is for the timestamp input I’m unable to change the format of the (Date and Time Picker) Magic Text. As a result Xano does not accept the default format. Please help.
I believe adalo uses the unix timestamp, as does Xano. I imagine (I have not tested this by the way) if you are creating a new record then the formatting of the date/time picker should be none (i.e, whatever Adalo’s default is). I am not referrring to how the picker looks on screen, I am referring to when you create a new record.
I am going off what I read here in the Xano docs Timestamp - Xano Documentation
This part seems to be where to look…
If you still have no luck I would try and convert the date picker time to milliseconds and input it as milliseconds into Xano. You can see how to convert a date to milliseconds here Getting Hours/Minutes/Seconds separately
I would like to have the date and time in unix timestamp but I’m not getting it… Can you help me?
For example, in the image below I’m just putting the date above into a custom formula (below):
The number below (18726.46…) is the number of days since 01/01/1970.
So to get seconds from it you just need to multiply it by 86400 (number of seconds in 1 day).