There's nothing inherent in templates to do this for you but there are options:


1.       Use javascript in the template, something like:

<tr>
                <td align="right"><b>GIS Date:</b></td>
<script>
  var date_jf = '[item name="Date"]';

  // process the date into something prettier
  var date = ...;

 // output the date (zillion ways to do this)
  document.write("<td>" + date +"</td>");
</script>
</tr>


2.       If you're using a db backend you could format things in your SQL.

Steve

From: [email protected] 
[mailto:[email protected]] On Behalf Of Mark Volz
Sent: Friday, June 13, 2014 2:18 PM
To: [email protected]
Subject: [mapserver-users] working with date formats in identify templates

Hello

I have a date that is in Julian format.  I would like to convert that date from 
Julian format such as '20140423' to something more user friendly like 
'4/23/2014' or 'April 23, 2014' etc.  Can I accomplish this through mapserver?

<tr>
                <td align="right"><b>GIS Date:</b></td>
                <td>[item name="Date"]</td>
</tr>

Thanks


Sincerely,
Mark Volz, GISP

_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to