[Qgis-user] Date formula in Layout label

Phil Wyatt phil at wyatt-family.com
Mon Jun 10 05:30:48 PDT 2019


Hi Patrick,

 

Try changing the double quotes to single quotes and I think it should work (in QGIS3)

 

format_date( $now,'yyyy-MM-dd HH:mm')

 

Cheers - Phil

 

From: Qgis-user [mailto:qgis-user-bounces at lists.osgeo.org] On Behalf Of Patrick Dunford
Sent: Monday, 10 June 2019 8:31 PM
To: qgis-user ML
Subject: [Qgis-user] Date formula in Layout label

 

Good day

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")%]

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? 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20190610/5f1e155d/attachment.html>


More information about the Qgis-user mailing list