HTML5 Data Bindings Formatter Support Product Page

Answered

I want to add minutes at a time

Asked 31 Mar 2015 05:43:30
1
has this question
31 Mar 2015 05:43:30 Steffen Windisch posted:
I want to add minutes at a time. I use to format the data binding. for example: {{...... time.formatDate ("HH: mm"}} - {{time_end.formatDate ("HH: mm" .dateAdd ("minutes", 30)}} How can I replacing 30 minutes a data field? for example: {{...... time.formatDate ("HH: mm"}} - {{time_end.formatDate ("HH: mm" .dateAdd ("minutes", u_dauer)}}

Replies

Replied 31 Mar 2015 13:38:12
31 Mar 2015 13:38:12 Teodor Kuduschiev replied:
Hi Steffen,

Could you please explain a little more detailed what exactly do you want to achieve, as is not clear from your post?
Replied 31 Mar 2015 17:22:49
31 Mar 2015 17:22:49 Steffen Windisch replied:
Hi Teodor,
I want to take the minutes of a database record. Is this possible? In Formater the field is 30 minutes to the sample through the field of database: to be filled "u_dauer".
www.dropbox.com/s/2sqg3kpjw0un5qf/Screenshot%202015-03-31%2019.25.15.png?dl=0
Replied 09 Apr 2015 12:31:47
09 Apr 2015 12:31:47 Steffen Windisch replied:
How can I use the minutes from a database record. {{time.dateAdd ("minutes", 30) like:
{{time.dateAdd ("minutes", database record)
Replied 14 Apr 2015 07:42:50
14 Apr 2015 07:42:50 Steffen Windisch replied:

My question is to understand?
Replied 14 Apr 2015 09:50:23
14 Apr 2015 09:50:23 Teodor Kuduschiev replied:
Hello Steffen,
That's exactly how you can use minutes from a database:

{{time.dateAdd ( "minutes", databaseFieldName )}}

Replied 15 Apr 2015 06:19:58
15 Apr 2015 06:19:58 Steffen Windisch replied:
Hi Teodor, I'm definitely still an error. see snap
www.dropbox.com/s/0c9vaioa7w1y9iu/Screenshot%202015-04-15%2008.11.22.png?dl=0
I have entered the following line:

{{time.format Date ("HH: mm")}} - {{time.dateAdd ("minutes", u_dauer)}}

Replied 15 Apr 2015 06:48:22
15 Apr 2015 06:48:22 Teodor Kuduschiev replied:
This cannot be entered through the extension UI. Please add is by hand in the code.
Replied 15 Apr 2015 08:48:17
15 Apr 2015 08:48:17 Steffen Windisch replied:
Sorry, I do not understand the answer. Where should I enter what code? If it's too complicated, then it must remain as it is.
Replied 15 Apr 2015 09:40:22
15 Apr 2015 09:40:22 Teodor Kuduschiev replied:
Open your page, switch to code view and paste:

{{time.dateAdd ("minutes", u_dauer)}}


That's all.
Replied 15 Apr 2015 11:25:51
15 Apr 2015 11:25:51 Steffen Windisch replied:
It does not work. I have uploaded a demo:
www.musikschule-windisch.de/admin/demo.html
This reply was removed on 4/15/2015 11:58:44 AM.
See the changelog
Replied 15 Apr 2015 12:21:20
15 Apr 2015 12:21:20 Teodor Kuduschiev replied:
You need to have your time formatted also...

{{time.dateAdd ("minutes", u_dauer).formatDate( "HH:mm" )}}

Replied 15 Apr 2015 15:17:04
15 Apr 2015 15:17:04 Steffen Windisch replied:
Unfortunately it does not work
www.musikschule-windisch.de/admin/demo.html
Replied 15 Apr 2015 15:49:05
15 Apr 2015 15:49:05 Teodor Kuduschiev replied:
What is the database field type for the "time"?
Replied 15 Apr 2015 16:20:52
Replied 18 Apr 2015 08:24:39
18 Apr 2015 08:24:39 Steffen Windisch replied:
"Time" is typ time and "u_dauer" is typ int
Replied 03 Jun 2015 06:50:59
03 Jun 2015 06:50:59 Steffen Windisch replied:
I want to add to the Formater a time. What format must have the MYSQL field? I use the type INT. It does not work.

www.musikschule-windisch.de/admin/demo.html

<td> {{time.formatDate( "HH:mm" )}}  bis {{time.dateAdd( "minutes", u_dauer ).formatDate( "HH:mm" )}}</td>


Replied 25 Jun 2016 11:29:55
25 Jun 2016 11:29:55 Steffen Windisch replied:
Here comes the solution to my problem! Thanks to Nikolaos Beligiannis < > for the result.
The u_dauer field must be of type time.

Then in the code, insert the following:
{{time.formatDate ("HH: mm") .dateAdd ("minutes", u_dauer.formatDate ("mm") -00) .formatDate ("HH: mm")}}

Reply to this topic