0

I was wondering how I can format the text and make some part of the datetime string bold?

For example I want to make my current date time format, which looks like: 02/19/2018 16:00 CST to 02/19/2018 16:00 CST.

This is the code that is generating the current date time format.

<td{{ visit['end_dte'] | date:'MM/dd/yyyy HH:mm Z'}}</td>

I tried doing <td{{ visit['end_dte'] | date:'MM/dd/yyyy <b>HH:mm Z</b>'}}</td> but it made it so that the pipe was represented as text instead of bolding the time.

Daniel
  • 3,541
  • 3
  • 33
  • 46
terrabl
  • 743
  • 3
  • 8
  • 23

1 Answers1

5

Separate it into 2 different filter calls

<td>
  {{ visit['end_dte'] | date:'MM/dd/yyyy'}} <b>{{ visit['end_dte'] | date:'HH:mm Z'}}</b>
</td>
Isaac
  • 11,409
  • 5
  • 33
  • 45