<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: VBScript label expression for dates. in ArcGIS Enterprise Portal Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/vbscript-label-expression-for-dates/m-p/724509#M9737</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm able to get the formatted date for my date field [SUR_DATE] in the label using the line &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;FormatDateTime([SUR_DATE])&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To drop the year, I had use the syntax&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Month( [SUR_DATE] ) &amp;amp; "/" &amp;amp; Day([SUR_DATE])&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Jun 2012 19:14:21 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2012-06-12T19:14:21Z</dc:date>
    <item>
      <title>VBScript label expression for dates.</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/vbscript-label-expression-for-dates/m-p/724508#M9736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I thought I could reformat a date variable to drop the year for a map label but all I can get from the label expression advanced box is "The expression contains an error. Modify the expression and try again."&amp;nbsp; Tried&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;FormatDateTime([StartDate], 1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Function ShortDate ( [StartDate] )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; ShortDate = FormatDateTime([StartDate],1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Function&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;where StartDate is a date item in my table formated mm/dd/yyyy For the second FormatDateTime argument, I've tired 1 and 0.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2012 18:04:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/vbscript-label-expression-for-dates/m-p/724508#M9736</guid>
      <dc:creator>PaulHuffman</dc:creator>
      <dc:date>2012-06-12T18:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: VBScript label expression for dates.</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/vbscript-label-expression-for-dates/m-p/724509#M9737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm able to get the formatted date for my date field [SUR_DATE] in the label using the line &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;FormatDateTime([SUR_DATE])&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To drop the year, I had use the syntax&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Month( [SUR_DATE] ) &amp;amp; "/" &amp;amp; Day([SUR_DATE])&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2012 19:14:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/vbscript-label-expression-for-dates/m-p/724509#M9737</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2012-06-12T19:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: VBScript label expression for dates.</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/vbscript-label-expression-for-dates/m-p/724510#M9738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, Ken, that's working for me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But the other thing I was trying to do to make the same label was to create a new item and use the field calculator and python to calculate the shorter date string. I thought I knew more about python but I couldn't get the syntax right.&amp;nbsp; It seems like you'd use &lt;/SPAN&gt;&lt;A href="http://www.tutorialspoint.com/python/time_strftime.htm"&gt;strftime&lt;/A&gt;&lt;SPAN&gt;, but maybe it doesn't work because the source item is already a date, not a string.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2012 00:19:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/vbscript-label-expression-for-dates/m-p/724510#M9738</guid>
      <dc:creator>PaulHuffman</dc:creator>
      <dc:date>2012-06-14T00:19:44Z</dc:date>
    </item>
  </channel>
</rss>

