<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Georgia;
panose-1:2 4 5 2 5 4 5 2 3 3;}
@font-face
{font-family:"Times New Roman \(Body CS\)";
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Georgia",serif;
font-variant:normal !important;
color:windowtext;
text-transform:none;
mso-contextual-alternates:no;
font-weight:normal;
font-style:normal;
text-decoration:none none;
vertical-align:baseline;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Georgia",serif">in these dialogs, double-quating is for variable (column) names, single quoting for strings (like most expression builders and eg. also in SQL)...<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Georgia",serif">...and you are correct, this is not stated in any obvious place, that should be made more clear!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Georgia",serif"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-family:"Georgia",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="NL" style="font-family:"Georgia",serif">--<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="NL" style="font-family:"Georgia",serif">Barend Köbben<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span lang="NL" style="font-size:12.0pt;font-family:"Georgia",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="NL" style="font-size:12.0pt;font-family:"Georgia",serif"><o:p> </o:p></span></p>
<div>
<div>
<p class="MsoNormal">On 11/06/2019, 13:08, "Qgis-user on behalf of DelazJ" <<a href="mailto:qgis-user-bounces@lists.osgeo.org">qgis-user-bounces@lists.osgeo.org</a> on behalf of
<a href="mailto:delazj@gmail.com">delazj@gmail.com</a>> wrote:<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal">Hi,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal">Le mar. 11 juin 2019 à 11:19, Patrick Dunford <<a href="mailto:enzedrailmaps@gmail.com">enzedrailmaps@gmail.com</a>> a écrit :<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p>It works, but it makes no sense<o:p></o:p></p>
</div>
</blockquote>
<div>
<p class="MsoNormal">Then please open an issue report if not yet done, to get it fixed.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Regards,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Harrissou<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p>Anyway thanks<o:p></o:p></p>
<div>
<p class="MsoNormal">On 11/06/19 12:30 AM, Phil Wyatt wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#1F497D">Hi Patrick,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#1F497D">Try changing the double quotes to single quotes and I think it should work (in QGIS3)</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#1F497D">format_date( $now,'yyyy-MM-dd HH:mm')</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#1F497D">Cheers - Phil</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#1F497D"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0cm 0cm 0cm;border-color:currentcolor currentcolor">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif"> Qgis-user [<a 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</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p>Good day<o:p></o:p></p>
<p style="margin:0cm;margin-bottom:.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")%]<o:p></o:p></p>
<p style="margin:0cm;margin-bottom:.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? <o:p></o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal">_______________________________________________<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" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-user</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</div>
</body>
</html>