How to format event start/end time using a column as date?

I just need to create a event after a form saving. To do that, I created a action that add a new row to the calendar table.

In Set these columns , I need to define the Start and End columns to contain values taken from another form, I can do that without problems. The value taken from the other form is a date, I need to set a datetime for Start/End columns using that date. To achieve this I tried to create an expression that uses the date column from the first form and manually inserts the time, but the AppSheet doesnโ€™t recognize it as a datetime.

I tried to format:
CONCATENATE([date_form_1], โ€œ 08:00:00โ€)
DATETIME(CONCATENATE([date_form_1], โ€œ 08:00:00โ€))
DATETIME ([date_form_1] & โ€œ 08:00:00โ€)

Only DATETIME([date_form_1]) worked, but I canโ€™t use the default time of noon.

Solved Solved
0 6 225
  • UX
1 ACCEPTED SOLUTION

Please try

DATETIME(CONCATENATE([date_form_1]," ", โ€œ8:00:00โ€))

Please note the space, " " between date and time value concatenation. I believe the Datetime column format needs a space between Date and Time values. Hope this helps.

View solution in original post

6 REPLIES 6

This one should have worked.
I have the same formula but it takes the time value from another column instead of hard coded like yours.
You could try changing โ€œ08:00:00โ€ for TIME(8:00)

DATETIME(CONCATENATE([date_form_1], TIME(8:00)))

It didnโ€™t work either, same error as the others

3X_f_9_f9b2498ae08c6fc934f9883ae7feb1bad334810d.png

Error:
3X_f_7_f72bd0e77c509bc3544557e1dcfed91cbe7c68c2.png

But thanks for the answer.

Please try

DATETIME(CONCATENATE([date_form_1]," ", โ€œ8:00:00โ€))

Please note the space, " " between date and time value concatenation. I believe the Datetime column format needs a space between Date and Time values. Hope this helps.

Haha, thatโ€™s true!
@Henrique_Vieira add the space in the concatenation and should work like charm. In my case I have the space in the expression and forgot about it

It really worked. I had already tried to add the space to the time string, but it still didnโ€™t work because the CONCATENATE function apparently ignores it. Putting space as a separate argument worked exactly as I needed it.

Thanks! I just noticed that in the post I forgot to mention that I manually added the space to โ€œ08:00:00โ€, I had been trying DATETIME(CONCATENATE([date_form_1], โ€œ 08:00:00โ€)). But apparently, the CONCATENATE function ignores the space at the beginning of the string. The way you informed it worked perfectly.

Top Labels in this Space