<div dir="ltr"><div dir="ltr"><div>Hi,</div><div><br></div></div><div>Reading the help of the format_date function, the second argument should be a string, and I'm not sure that "yyyy-MM-dd HH:mm" is necessarily read as string in this context. I actually don't know what it's read as.</div><div><br></div><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mar. 11 juin 2019 à 11:19, Patrick Dunford <<a href="mailto:enzedrailmaps@gmail.com">enzedrailmaps@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>It works, but it makes no sense</p>
<p></p></div></blockquote><div>Then please open an issue report if not yet done, to get it fixed.</div><div><br></div><div>Regards,</div><div>Harrissou<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF"><p>Anyway thanks<br>
</p>
<div class="gmail-m_-1827240375134216166moz-cite-prefix">On 11/06/19 12:30 AM, Phil Wyatt wrote:<br>
</div>
<blockquote type="cite">
<div class="gmail-m_-1827240375134216166WordSection1">
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)">Hi
Patrick,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)">Try
changing the double quotes to single quotes and I think it
should work (in QGIS3)<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)">format_date(
$now,'yyyy-MM-dd HH:mm')<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)">Cheers
- Phil<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)"><u></u> <u></u></span></p>
<div>
<div style="border-color:rgb(181,196,223) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Tahoma","sans-serif";color:windowtext" lang="EN-US">From:</span></b><span style="font-size:10pt;font-family:"Tahoma","sans-serif";color:windowtext" lang="EN-US"> Qgis-user
[<a class="gmail-m_-1827240375134216166moz-txt-link-freetext" href="mailto:qgis-user-bounces@lists.osgeo.org" target="_blank">mailto:qgis-user-bounces@lists.osgeo.org</a>] <b>On Behalf
Of </b>Patrick Dunford<br>
<b>Sent:</b> Monday, 10 June 2019 8:31 PM<br>
<b>To:</b> qgis-user ML<br>
<b>Subject:</b> [Qgis-user] Date formula in Layout label<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p>Good day<u></u><u></u></p>
<p style="margin:0cm 0cm 0.0001pt">When
I create a layout and put a text label in it I want to be able
to show the current date using a formula. This formula can
look something like [%format_date( $now,"yyyy-MM-dd HH:mm")%]<u></u><u></u></p>
<p style="margin:0cm 0cm 0.0001pt">I
have to put this in square brackets so that the formula is
executed instead of it just appearing as plain text. However
when displayed on the page, the square brackets are included
in the output. How do I get rid of them so that I just have
the numbers of the date and time displayed? <u></u><u></u></p>
</div>
</blockquote>
</div>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></blockquote></div></div></div>