CoreBOSBB
Time formatting in workflow emails - Printable Version

+- CoreBOSBB (https://discussions.corebos.org)
+-- Forum: Support (https://discussions.corebos.org/forumdisplay.php?fid=17)
+--- Forum: User Support (https://discussions.corebos.org/forumdisplay.php?fid=6)
+--- Thread: Time formatting in workflow emails (/showthread.php?tid=1211)



Time formatting in workflow emails - partnerwerk - 08-16-2018

We are sending automated emails with scheduled appointments to our customers.

Without formatting the email template looks like this:
Quote:am $date_start um $time_start Uhr

with the following output:
Quote:am 18-08-2018 um 22:42:00 Uhr

Now that is not the desired outcome.
This is how it should look like:
Quote:am 18. August 2018 um 22:42 Uhr

I could find a way to do the date formatting but cannot apply it to get rid of the third digit pair (seconds) for the time. You don't want to get an appointment where they say on which second it starts - even not in Germany.

Is there any solution for this?


RE: Time formatting in workflow emails - joebordes - 08-16-2018

Try this one:

substring(time_start,0,5)

You can do the day and year easily and for the month you will have to use the translate() workflow function


RE: Time formatting in workflow emails - partnerwerk - 08-17-2018

This seems to be a misunderstanding. I figured out a way for the date (day, month, year).
But I had no solution to get rid of the seconds of $time_start.

I was just wondering if there is a built in function to customize time output (of $time_start). After I could not find any I built a custom function which is working now.


RE: Time formatting in workflow emails - joebordes - 08-17-2018

again, for the time, use:

substring(time_start,0,5)