<?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: Formating field values in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455420#M12360</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you look at the code snippet I provided, I declare the field as a &lt;/SPAN&gt;&lt;STRONG&gt;esriFieldTypeDate&lt;/STRONG&gt;&lt;SPAN&gt;, then I store an instance of a DateTime class.&amp;nbsp; Internally, the DateTime stores the Ticks elapsed since the epoch.&amp;nbsp; I know I can declare the field as a &lt;/SPAN&gt;&lt;STRONG&gt;esriFieldTypeString&lt;/STRONG&gt;&lt;SPAN&gt; and store the formatted value, but then it wouldn't be searchable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess what I'm asking, is if there is a way to specify the output format for a field value?&amp;nbsp; Regardless if it's specifying a double's precision or the timestamp format.&amp;nbsp; I would think that you could specify it when creating the FeatureClass or FeatureLayer because it's a presentation thing.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 May 2013 17:42:30 GMT</pubDate>
    <dc:creator>MichaelMurphy8</dc:creator>
    <dc:date>2013-05-14T17:42:30Z</dc:date>
    <item>
      <title>Formating field values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455416#M12356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to create a feature class with a number of fields, and I've got the data to load properly.&amp;nbsp; However; I'd like to format the Date field so that the ArcMAP (Identify) always displays the date and time when selected in ArcMAP.&amp;nbsp; Is there a way to specify the formatting for a specific field value?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's what I've got thus far... (I'd like for it to always display as YYYYMMDD HH:mm:SS UTC instead of the default of 12:00:00 AM)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
public static IFeatureClass createFeatureClassWithSR(string fcn, IFeatureWorkspace fw, ISpatialReference sr, string filname) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IFeatureClassDescription fcDesc = new FeatureClassDescriptionClass();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IObjectClassDescription objDesc = (IObjectClassDescription)fcDesc;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IFields fields = objDesc.RequiredFields;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IFieldsEdit fieldsEdit = (IFieldsEdit)fields;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int shapeIdx = fields.FindField(fcDesc.ShapeFieldName);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IField field = fields.get_Field(shapeIdx);

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IField f18 = new FieldClass();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IFieldEdit f18Edit = (IFieldEdit)f18;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f18Edit.Name_2 = "TOA";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f18Edit.Type_2 = esriFieldType.esriFieldTypeDate;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f18Edit.AliasName_2 = "TOA";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f18Edit.IsNullable_2 = false;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f18Edit.Editable_2 = false;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DateTime d = new DateTime();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f18Edit.DefaultValue_2 = d;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fieldsEdit.AddField(f18);
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 May 2013 22:26:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455416#M12356</guid>
      <dc:creator>MichaelMurphy8</dc:creator>
      <dc:date>2013-05-13T22:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Formating field values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455417#M12357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Michael,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you asking you want to actually see the text " YYYYMMDD HH:mm:SS UTC " as a default rather than "12:00:00 AM" or you want to see "12:00:00 AM" in the "YYYYMMDD HH:mm:SS UTC" format?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;From your code you create a datetime object but don't actually set any of its properties, have a look at the examples at the end of this &lt;/SPAN&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/system.datetime.aspx?cs-save-lang=1&amp;amp;cs-lang=vb#code-snippet-1"&gt;page&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Duncan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2013 07:48:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455417#M12357</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2013-05-14T07:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: Formating field values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455418#M12358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I know how to format the DateTime ToString output.&amp;nbsp; What I'm trying to accomplish is to get ArcMAP to display the format I choose when the user highlights a Point on the screen and click the "Identify" button to view the field values.&amp;nbsp; There must be a way to tell ArcMap how to format the field values when the user selects/views an object on the screen.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2013 16:26:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455418#M12358</guid>
      <dc:creator>MichaelMurphy8</dc:creator>
      <dc:date>2013-05-14T16:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Formating field values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455419#M12359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think what Duncan is asking is whether you are trying to convert what record values are in your date field as they are, or are you trying to store them in your date field in the format you want?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;12:00 AM is 12:00 AM.&amp;nbsp; Did you insert that date value into the record as 12:00 AM?&amp;nbsp; If yes, then that is all you'll get back out.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you are trying to convert 12:00 AM to this: 3/19/2013 12:13:27 PM - I don't think you can.&amp;nbsp; Someone correct me if I'm wrong.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you entered the date value as: 3/19/2013, you might be able to convert it to the format you want.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ESRI's field calculator calculates Date() as 3/19/2013&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ESRI's field calculator calculates Now() as 3/19/2013 12:13:27 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2013 17:03:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455419#M12359</guid>
      <dc:creator>LeoDonahue</dc:creator>
      <dc:date>2013-05-14T17:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: Formating field values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455420#M12360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you look at the code snippet I provided, I declare the field as a &lt;/SPAN&gt;&lt;STRONG&gt;esriFieldTypeDate&lt;/STRONG&gt;&lt;SPAN&gt;, then I store an instance of a DateTime class.&amp;nbsp; Internally, the DateTime stores the Ticks elapsed since the epoch.&amp;nbsp; I know I can declare the field as a &lt;/SPAN&gt;&lt;STRONG&gt;esriFieldTypeString&lt;/STRONG&gt;&lt;SPAN&gt; and store the formatted value, but then it wouldn't be searchable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess what I'm asking, is if there is a way to specify the output format for a field value?&amp;nbsp; Regardless if it's specifying a double's precision or the timestamp format.&amp;nbsp; I would think that you could specify it when creating the FeatureClass or FeatureLayer because it's a presentation thing.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2013 17:42:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455420#M12360</guid>
      <dc:creator>MichaelMurphy8</dc:creator>
      <dc:date>2013-05-14T17:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: Formating field values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455421#M12361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;If you look at the code snippet I provided, I declare the field as a &lt;STRONG&gt;esriFieldTypeDate&lt;/STRONG&gt;, &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;I saw it.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So when you do: DateTime d = new DateTime(); that inserts 12:00 AM into your record?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If yes, then you need to format the date before it goes in.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2013 20:43:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455421#M12361</guid>
      <dc:creator>LeoDonahue</dc:creator>
      <dc:date>2013-05-14T20:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Formating field values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455422#M12362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK.&amp;nbsp; I think I found some buggy behavior, because now it's sort-of working.&amp;nbsp; In the code snippet above, I set the default value of the field to a new DateTime() object -- which defaults to the epoch and should have zero ticks.&amp;nbsp; It displays as 12:00:00 AM.&amp;nbsp; After I start setting the &lt;/SPAN&gt;&lt;STRONG&gt;kind, year, day, seconds&lt;/STRONG&gt;&lt;SPAN&gt; on the instance, it displays as 1/1/2013 12:00:00 AM.&amp;nbsp; This still isn't desirable, I'd like for it to display in 24 hour time format,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2013 21:16:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455422#M12362</guid>
      <dc:creator>MichaelMurphy8</dc:creator>
      <dc:date>2013-05-14T21:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Formating field values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455423#M12363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I saw it.&amp;nbsp; &lt;BR /&gt;So when you do: DateTime d = new DateTime(); that inserts 12:00 AM into your record?&amp;nbsp; &lt;BR /&gt;If yes, then you need to format the date before it goes in.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you give me an example?&amp;nbsp; I'm not used to C#, the language seems to be a little backwards from Java.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2013 21:18:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455423#M12363</guid>
      <dc:creator>MichaelMurphy8</dc:creator>
      <dc:date>2013-05-14T21:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Formating field values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455424#M12364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The samples were in Duncan's post.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/system.datetime.today.aspx" rel="nofollow noopener noreferrer" target="_blank"&gt;http://msdn.microsoft.com/en-us/library/system.datetime.today.aspx&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
using System;

public class Example
{
&amp;nbsp;&amp;nbsp; public static void Main()
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Get the current date.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DateTime thisDay = DateTime.Today;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Display the date in the default (general) format.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(thisDay.ToString());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Display the date in a variety of formats.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(thisDay.ToString("d"));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(thisDay.ToString("D"));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(thisDay.ToString("g"));
&amp;nbsp;&amp;nbsp; }
}
// The example displays output similar to the following: 
//&amp;nbsp;&amp;nbsp;&amp;nbsp; 5/3/2012 12:00:00 AM 
//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
//&amp;nbsp;&amp;nbsp;&amp;nbsp; 5/3/2012 
//&amp;nbsp;&amp;nbsp;&amp;nbsp; Thursday, May 03, 2012 
//&amp;nbsp;&amp;nbsp;&amp;nbsp; 5/3/2012 12:00 AM
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:18:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455424#M12364</guid>
      <dc:creator>LeoDonahue</dc:creator>
      <dc:date>2021-12-11T20:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: Formating field values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455425#M12365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So, that example only works if I were storing the data into a String.&amp;nbsp; That's not what I want.&amp;nbsp; I'm trying to store the data as a &lt;/SPAN&gt;&lt;STRONG&gt;esriFieldTypeDate &lt;/STRONG&gt;&lt;SPAN&gt; object so that it's searchable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do I need to specify the CultureInfo when creating the DateTime object or something to force ArcMAP to display the field in the format that I want?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2013 22:19:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455425#M12365</guid>
      <dc:creator>MichaelMurphy8</dc:creator>
      <dc:date>2013-05-14T22:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: Formating field values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455426#M12366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The example was just an example.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;According to that example, if you declare "thisDay" the way they did, it would be in the format you want.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Wouldn't you do something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;DateTime thisDay = DateTime.Today;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;f18Edit.DefaultValue_2 = thisDay;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 13:16:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455426#M12366</guid>
      <dc:creator>LeoDonahue</dc:creator>
      <dc:date>2013-05-15T13:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Formating field values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455427#M12367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When I create a FeatureClass, there doesn't appear to be a way to specify the formatting of the value.&amp;nbsp; In the example you've shown, the DateTime instance is initialized to a value of "Today".&amp;nbsp; However, the initialization of the DateTime instance is independant of the presentation format.&amp;nbsp; In ArcMap, when I select a feature using the "Identify" tool, the pop-up displays the DateTime value as MM/dd/yyyy hh:mm:s AM/PM.&amp;nbsp; I want to change that display format to yyyy-MM-dd HH:mm:ssZ.&amp;nbsp; Similarly, there's other field values in the same FeatureClass that I would like to display truncated.&amp;nbsp; For example, I only want to display 1 decimal place for certain fields.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 15:41:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455427#M12367</guid>
      <dc:creator>MichaelMurphy8</dc:creator>
      <dc:date>2013-05-15T15:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Formating field values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455428#M12368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;However, the initialization of the DateTime instance is independant of&amp;nbsp; the presentation format. &lt;/BLOCKQUOTE&gt;&lt;SPAN&gt; Ok.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;In ArcMap, when I select a feature using the&amp;nbsp; "Identify" tool, the pop-up displays the DateTime value as MM/dd/yyyy&amp;nbsp; hh:mm:s AM/PM.&amp;nbsp; I want to change that display format to yyyy-MM-dd&amp;nbsp; HH:mm:ssZ&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You want to change ArcMap's Identify tool to display the format you want? Or are you attempting to create your own "identify" tool to do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you are creating your own identify tool, why can't you format the date from mm/dd/yyyy to yyyy/mm/dd ?&amp;nbsp; That seems easy to do; get the date value, get the day, get the month, get the year, etc..., then rearrange it into the string you want.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the layer properties, fields tab, there is a place where you can change number of decimal places shown for that field, but not for dates.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 16:22:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/formating-field-values/m-p/455428#M12368</guid>
      <dc:creator>LeoDonahue</dc:creator>
      <dc:date>2013-05-15T16:22:14Z</dc:date>
    </item>
  </channel>
</rss>

