<?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 Date field attribute not displaying correctly in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/date-field-attribute-not-displaying-correctly/m-p/398804#M31454</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear Sir &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I entered date field as variable like VDate = Sys.argv[4] using arcpy.CalculateField_management("BLD_PG", "BLD_PG_DT", VDate, "PYTHON_9.3", "")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But in attribute table&amp;nbsp; attribute of the Date field look like 12:01:00 AM. How to correct it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Padmasiri&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Apr 2014 10:01:16 GMT</pubDate>
    <dc:creator>H_A_D_Padmasiri</dc:creator>
    <dc:date>2014-04-25T10:01:16Z</dc:date>
    <item>
      <title>Date field attribute not displaying correctly</title>
      <link>https://community.esri.com/t5/python-questions/date-field-attribute-not-displaying-correctly/m-p/398804#M31454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear Sir &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I entered date field as variable like VDate = Sys.argv[4] using arcpy.CalculateField_management("BLD_PG", "BLD_PG_DT", VDate, "PYTHON_9.3", "")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But in attribute table&amp;nbsp; attribute of the Date field look like 12:01:00 AM. How to correct it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Padmasiri&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2014 10:01:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/date-field-attribute-not-displaying-correctly/m-p/398804#M31454</guid>
      <dc:creator>H_A_D_Padmasiri</dc:creator>
      <dc:date>2014-04-25T10:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Date field attribute not displaying correctly</title>
      <link>https://community.esri.com/t5/python-questions/date-field-attribute-not-displaying-correctly/m-p/398805#M31455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Padmisiri,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You will want to format the date like the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;time.strftime('05/02/2014')&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ex:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;arcpy.CalculateField_management("BLD_PG", "BLD_PG_DT", "time.strftime('05/02/2014')", "PYTHON")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2014 11:15:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/date-field-attribute-not-displaying-correctly/m-p/398805#M31455</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2014-04-25T11:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: Date field attribute not displaying correctly</title>
      <link>https://community.esri.com/t5/python-questions/date-field-attribute-not-displaying-correctly/m-p/398806#M31456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Padmisiri,&lt;BR /&gt;&lt;BR /&gt;You will want to format the date like the following:&lt;BR /&gt;&lt;BR /&gt;time.strftime('05/02/2014')&lt;BR /&gt;&lt;BR /&gt;Ex:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;arcpy.CalculateField_management("BLD_PG", "BLD_PG_DT", "time.strftime('05/02/2014')", "PYTHON")&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you please explain How to enter '05/02/2014' as a variable. (VDate)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2014 10:11:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/date-field-attribute-not-displaying-correctly/m-p/398806#M31456</guid>
      <dc:creator>H_A_D_Padmasiri</dc:creator>
      <dc:date>2014-04-28T10:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: Date field attribute not displaying correctly</title>
      <link>https://community.esri.com/t5/python-questions/date-field-attribute-not-displaying-correctly/m-p/398807#M31457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here is an example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;VDate = "time.strftime('05/02/2014')"&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2014 11:30:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/date-field-attribute-not-displaying-correctly/m-p/398807#M31457</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2014-04-28T11:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Date field attribute not displaying correctly</title>
      <link>https://community.esri.com/t5/python-questions/date-field-attribute-not-displaying-correctly/m-p/398808#M31458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Here is an example:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;VDate = "time.strftime('05/02/2014')"&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your answer.it runs correctly, But I add a field called "BLD_PG_DT"(Date Type) it gives me following error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I cant understand the error. can you correct it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Padmasiri&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;VDate = sys.argv[4] # This date value from the calender&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.AddField_management("BLD_PG", "BLD_PG_DT", "DATE", "", "", "", "Validity Date", "NULLABLE", "NON_REQUIRED", "")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.CalculateField_management("BLD_PG", "BLD_PG_DT", "time.strftime('VDate')", "PYTHON_9.3", "")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "J:\Gampaha\Scripts\Creating_Building.py", line 57, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CalculateField_management("BLD_PG", "BLD_PG_DT", "time.strftime('VDate')", "PYTHON_9.3", "")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "c:\program files\arcgis\desktop10.1\arcpy\arcpy\management.py", line 3128, in CalculateField&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise e&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ExecuteError: ERROR 999999: Error executing function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The value type is incompatible with the field type. [BLD_PG_DT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute (CalculateField).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute (LISTool1.02).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2014 07:20:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/date-field-attribute-not-displaying-correctly/m-p/398808#M31458</guid>
      <dc:creator>H_A_D_Padmasiri</dc:creator>
      <dc:date>2014-04-30T07:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Date field attribute not displaying correctly</title>
      <link>https://community.esri.com/t5/python-questions/date-field-attribute-not-displaying-correctly/m-p/398809#M31459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you post your entire code?&amp;nbsp; Be sure to wrap it in the appropriate &lt;PRE&gt; tags.&lt;/PRE&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2014 09:15:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/date-field-attribute-not-displaying-correctly/m-p/398809#M31459</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2014-04-30T09:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: Date field attribute not displaying correctly</title>
      <link>https://community.esri.com/t5/python-questions/date-field-attribute-not-displaying-correctly/m-p/398810#M31460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Can you post your entire code?&amp;nbsp; Be sure to wrap it in the appropriate &lt;PRE&gt; tags.&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dear sir&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My entire code is send here with. Pl see attachment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Padmasiri&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 02:36:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/date-field-attribute-not-displaying-correctly/m-p/398810#M31460</guid>
      <dc:creator>H_A_D_Padmasiri</dc:creator>
      <dc:date>2014-05-02T02:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: Date field attribute not displaying correctly</title>
      <link>https://community.esri.com/t5/python-questions/date-field-attribute-not-displaying-correctly/m-p/398811#M31461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For some reason, I could not get this to work with 'sys.argv' but I was able to with &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//018v00000047000000"&gt;arcpy.GetParameterAsText&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; Are you able to use the GetParameterAsText rather than sys.argv?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 10:28:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/date-field-attribute-not-displaying-correctly/m-p/398811#M31461</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2014-05-02T10:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: Date field attribute not displaying correctly</title>
      <link>https://community.esri.com/t5/python-questions/date-field-attribute-not-displaying-correctly/m-p/398812#M31462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;For some reason, I could not get this to work with 'sys.argv' but I was able to with &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//018v00000047000000"&gt;arcpy.GetParameterAsText&lt;/A&gt;.&amp;nbsp; Are you able to use the GetParameterAsText rather than sys.argv?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dear sir&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I save a date as a variyable, which I take from the calender like (mm/dd/yyyy).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My question is why that variyable directly enter to date field without formatting ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; What is the correct method to enter in to the date field which I take from the calender?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I cant understand what is the purpose of using calender.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kindly explain me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Padmasiri&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2014 09:44:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/date-field-attribute-not-displaying-correctly/m-p/398812#M31462</guid>
      <dc:creator>H_A_D_Padmasiri</dc:creator>
      <dc:date>2014-05-05T09:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: Date field attribute not displaying correctly</title>
      <link>https://community.esri.com/t5/python-questions/date-field-attribute-not-displaying-correctly/m-p/398813#M31463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Padmasiri,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try replacing your sys.argv arguments with arcpy.GetParameterAsText.&amp;nbsp; Here is an example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# Import arcpy module
import arcpy
import os
from arcpy import env
import shutil
import sys
import time

# Local variables:
Cad_File = arcpy.GetParameterAsText(1)#J:\Gampaha\510272\51027202.dwg
Pro_File = arcpy.GetParameterAsText(2)#I:\Projections\ProSriLanka99_5
Folder_Loca = arcpy.GetParameterAsText(3)#J:\Gampaha
VDate = "time.strftime('" + arcpy.GetParameterAsText(4) + "')"
Folder_Name = os.path.splitext(os.path.basename(Cad_File))[0]#51027202
Out_folder = os.path.join(Folder_Loca, Folder_Name)#J:\Gampaha\51027202
Gdb_Name = "CAD" + Folder_Name#CAD51027202
Gdb_Name1 = "CM" + Folder_Name#CM51027202
Gdb_Path = os.path.join(Out_folder, Gdb_Name)#J:\Gampaha\51027202\CAD51027202
Gdb_Path1 = os.path.join(Out_folder, Gdb_Name1)#J:\Gampaha\51027202\CM51027202
Fea_Dset_Name = "CAD" + Folder_Name#CAD51027202
Fea_Dset_Name1 = "CM" + Folder_Name#CAD51027202
Fea_Class_Path = os.path.join(Gdb_Path1 + ".gdb", Fea_Dset_Name1)#J:\Gampaha\51027202\CM51027202.gdb\CM51027202
if os.path.isdir(Out_folder):
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.env.workspace = Out_folder
&amp;nbsp;&amp;nbsp;&amp;nbsp; Gdb_List = arcpy.ListWorkspaces("", "FileGDB")
&amp;nbsp;&amp;nbsp;&amp;nbsp; for GDB in Gdb_List:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Delete_management(GDB)
&amp;nbsp;&amp;nbsp;&amp;nbsp; shutil.rmtree(Out_folder)
Ws_Path = Gdb_Path + ".gdb" + os.sep + Gdb_Name
arcpy.DefineProjection_management(Cad_File, Pro_File)
arcpy.CreateFolder_management(Folder_Loca, Folder_Name)#J:\Gampaha\510272\51027202
arcpy.env.workspace = Out_folder
arcpy.CreateFileGDB_management(Out_folder, Gdb_Name, "CURRENT")#J:\Gampaha\51027202\CAD51027202.gdb
arcpy.CreateFileGDB_management(Out_folder, Gdb_Name1, "CURRENT")#J:\Gampaha\51027202\CM51027202.gdb
arcpy.CreateFeatureDataset_management(Gdb_Path1 + ".gdb", Fea_Dset_Name1, Pro_File)#J:\Gampaha\51027202\CM51027202.gdb\CAD51027202
env.workspace = Gdb_Path + os.sep + Fea_Dset_Name
#arcpy.env.Scratchworkspace = Gdb_Path
arcpy.CADToGeodatabase_conversion(Cad_File, Gdb_Path + ".gdb", Fea_Dset_Name, "2000")
arcpy.CreateTopology_management(Fea_Class_Path, "PCL_LN_Topology", 0.01)
Polyline = Ws_Path + os.sep + "Polyline"
Pnt = Ws_Path + os.sep + "Point"
PLN_Topology = Fea_Class_Path + os.sep + "PCL_LN_Topology"
Fea_Class = Fea_Class_Path + os.sep + "BLD_LN" #NL
#Creating Structure Feature Class
env.workspace = Fea_Class_Path #NL
arcpy.FeatureClassToFeatureClass_conversion(Polyline, Fea_Class_Path, "BLD_LN", " \"Layer\" = 'OBJ-MAN-MADE' ")
arcpy.FeatureToPolygon_management(Fea_Class, Fea_Class_Path + os.sep + "BLD_PG", 0.01, "ATTRIBUTES", "")
arcpy.AddField_management("BLD_PG", "BLD_PG_NM", "TEXT", "", "", "50", "Building Name", "NULLABLE", "NON_REQUIRED", "")
arcpy.AddField_management("BLD_PG", "BLD_PG_CD", "SHORT", "", "", "", "BLD SD Code", "NULLABLE", "NON_REQUIRED", "")
SubType_Dict = {"0": "Permanent Building", "1": "Temporary Building", "2": "Building Underconstruction"}
arcpy.SetSubtypeField_management("BLD_PG", "BLD_PG_CD")
for code in SubType_Dict:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddSubtype_management("BLD_PG", code, SubType_Dict&lt;PRE class="lia-code-sample line-numbers language-none"&gt;)
arcpy.SetDefaultSubtype_management("BLD_PG", "0")
arcpy.AddField_management("BLD_PG", "BLD_PG_DT", "DATE", "", "", "", "Validity Date", "NULLABLE", "NON_REQUIRED", "")
arcpy.CalculateField_management("BLD_PG", "BLD_PG_DT", VDate, "PYTHON_9.3", "")&lt;/PRE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:12:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/date-field-attribute-not-displaying-correctly/m-p/398813#M31463</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-12-11T18:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: Date field attribute not displaying correctly</title>
      <link>https://community.esri.com/t5/python-questions/date-field-attribute-not-displaying-correctly/m-p/398814#M31464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Padmasiri,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try replacing your sys.argv arguments with arcpy.GetParameterAsText.&amp;nbsp; Attached is an example.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2014 10:05:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/date-field-attribute-not-displaying-correctly/m-p/398814#M31464</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2014-05-05T10:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: Date field attribute not displaying correctly</title>
      <link>https://community.esri.com/t5/python-questions/date-field-attribute-not-displaying-correctly/m-p/398815#M31465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Padmasiri,&lt;BR /&gt;&lt;BR /&gt;Try replacing your sys.argv arguments with arcpy.GetParameterAsText.&amp;nbsp; Attached is an example.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dear sir&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I replacing my sys.argv arguments with arcpy.GetParameterAsText and try. But it gives me following error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Executing: LISTool1.02 J:\Gampaha\270054\27005402.dxf I:\Projections\ProSriLanka99_5.prj J:\Gampaha 06/19/2013&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Start Time: Tue May 06 12:50:08 2014&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Running script LISTool1.02...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "J:\Gampaha\Scripts\Creating_Building.py", line 13, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; VDate = "time.strftime('" + arcpy.GetParameterAsText(4) + "')"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "c:\program files\arcgis\desktop10.1\arcpy\arcpy\__init__.py", line 592, in GetParameterAsText&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return gp.getParameterAsText(index)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "c:\program files\arcgis\desktop10.1\arcpy\arcpy\geoprocessing\_base.py", line 224, in getParameterAsText&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self._gp.GetParameterAsText(*gp_fixargs(args, True)))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RuntimeError: Object: Error in getting parameter as text&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute (LISTool1.02).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed at Tue May 06 12:50:08 2014 (Elapsed Time: 0.00 seconds)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Padmasiri&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 06:28:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/date-field-attribute-not-displaying-correctly/m-p/398815#M31465</guid>
      <dc:creator>H_A_D_Padmasiri</dc:creator>
      <dc:date>2014-05-06T06:28:16Z</dc:date>
    </item>
  </channel>
</rss>

