<?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>question How to set mm-dd-yyyy value from string to date field in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/how-to-set-mm-dd-yyyy-value-from-string-to-date-field/m-p/1911091#M568017</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Need to some help to set value received in a string field with format mm-dd-yyyy to date field(not datetime field). Can anyone help here. I am setting this value in variable of catalog item.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Richa&lt;/P&gt;</description>
    <pubDate>Wed, 02 Nov 2016 18:17:34 GMT</pubDate>
    <dc:creator>richam</dc:creator>
    <dc:date>2016-11-02T18:17:34Z</dc:date>
    <item>
      <title>How to set mm-dd-yyyy value from string to date field</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-set-mm-dd-yyyy-value-from-string-to-date-field/m-p/1911091#M568017</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Need to some help to set value received in a string field with format mm-dd-yyyy to date field(not datetime field). Can anyone help here. I am setting this value in variable of catalog item.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Richa&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 18:17:34 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-set-mm-dd-yyyy-value-from-string-to-date-field/m-p/1911091#M568017</guid>
      <dc:creator>richam</dc:creator>
      <dc:date>2016-11-02T18:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to set mm-dd-yyyy value from string to date field</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-set-mm-dd-yyyy-value-from-string-to-date-field/m-p/1911092#M568018</link>
      <description>&lt;P&gt;Hi Richa - please try below; they both produce the same date:&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="_jivemacro_uid_14781110001519564 jive_macro_code jive_text_macro" data-renderedposition="50_8_932_32" jivemacro_uid="_14781110001519564"&gt;&lt;P&gt;gs.print(new GlideDateTime('2016-08-09').getDate()); &amp;nbsp; // *** Script: 2016-08-09&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;gs.print(new GlideDateTime('08-09-2016').getDate()); &amp;nbsp; // *** Script: 2016-08-09&lt;/P&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;EDIT: &lt;SPAN style="font-family: courier new,courier;"&gt;.getDate()&lt;/SPAN&gt; returns &lt;SPAN style="font-family: courier new,courier;"&gt;GlideDate&lt;/SPAN&gt;.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;A title="ki.servicenow.com/?title=GlideDateTime#getDate.28.29" href="http://wiki.servicenow.com/?title=GlideDateTime#getDate.28.29"&gt;http://wiki.servicenow.com?title=GlideDateTime#getDate.28.29&lt;/A&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;EM&gt;Please feel free to connect, follow, mark helpful / answer, like, endorse.&lt;/EM&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;John Chun, &lt;SPAN style="font-size: 8pt;"&gt;PhD PMP&lt;/SPAN&gt; &lt;A href="http://linkedin.com/in/DrJohnChun"&gt;&lt;IMG alt="see John's LinkedIn profile" class="image-2 jive-image" src="http://megaicons.net/static/img/icons_sizes/182/456/16/linkedin-icon.png" style="height: auto; vertical-align: -13px;" title="see John's LinkedIn profile" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;A href="http://snowaid.com/"&gt;&lt;IMG alt="visit snowaid" class="image-1 jive-image" src="http://snowaid.com/images/signature.png" style="height: auto; margin-top: -9px;" title="visit snowaid" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Nov 2016 18:24:02 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-set-mm-dd-yyyy-value-from-string-to-date-field/m-p/1911092#M568018</guid>
      <dc:creator>drjohnchun</dc:creator>
      <dc:date>2016-11-02T18:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to set mm-dd-yyyy value from string to date field</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-set-mm-dd-yyyy-value-from-string-to-date-field/m-p/1911093#M568019</link>
      <description>&lt;P&gt;Hi Richa,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; First change the format of your default date. if it is YYYY-MM-DD change it to MM-DD-YYYY by going to system properties =&amp;gt; System and there you can search for date format field and change it there.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;And may be this thread may come in handy for rest&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;A title="How to convert date format" __default_attr="166096" __jive_macro_name="thread" class="jive_macro_thread jive_macro" data-orig-content="How to convert date format" data-renderedposition="136_8_191_16" href="https://www.servicenow.com/community?id=community_question&amp;amp;sys_id=822f07e1dbdcdbc01dcaf3231f961978"&gt;How to convert date format&lt;/A&gt; &lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;A title="User Date Format and .setValue (date / time) inconsistencies" __default_attr="162431" __jive_macro_name="thread" class="jive_macro_thread jive_macro" data-orig-content="User Date Format and .setValue (date / time) inconsistencies" data-renderedposition="157_8_404_16" href="https://www.servicenow.com/community?id=community_question&amp;amp;sys_id=89790b65db5cdbc01dcaf3231f9619b6"&gt;User Date Format and .setValue (date / time) inconsistencies&lt;/A&gt; &lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thank you &lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Nov 2016 18:39:20 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-set-mm-dd-yyyy-value-from-string-to-date-field/m-p/1911093#M568019</guid>
      <dc:creator>Natsufab3</dc:creator>
      <dc:date>2016-11-02T18:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to set mm-dd-yyyy value from string to date field</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-set-mm-dd-yyyy-value-from-string-to-date-field/m-p/1911094#M568020</link>
      <description>&lt;P&gt;Here you go. use this in a server side code&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;var usr= new GlideRecord('sys_user');&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;usr.get(gs.getUserID());&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;var gd=new GlideDate();&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; gd.setDisplayValue(your date value);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; current.&amp;lt;your date field name&amp;gt;=gd.getByFormat(usr.getValue('date_format'));&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Nov 2016 19:12:05 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-set-mm-dd-yyyy-value-from-string-to-date-field/m-p/1911094#M568020</guid>
      <dc:creator>Abhinay Erra</dc:creator>
      <dc:date>2016-11-02T19:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to set mm-dd-yyyy value from string to date field</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-set-mm-dd-yyyy-value-from-string-to-date-field/m-p/1911095#M568021</link>
      <description>&lt;P&gt;This works as expected,thanks Abhinay &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_emote jive_macro" data-renderedposition="8_258.83331298828125_16_16" src="https://www.servicenow.com/8.0.4.21bdc7e/images/emoticons/happy.png"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Nov 2016 09:44:03 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-set-mm-dd-yyyy-value-from-string-to-date-field/m-p/1911095#M568021</guid>
      <dc:creator>richam</dc:creator>
      <dc:date>2016-11-03T09:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to set mm-dd-yyyy value from string to date field</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-set-mm-dd-yyyy-value-from-string-to-date-field/m-p/1911096#M568022</link>
      <description>&lt;P&gt;Glad you got your question answered.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Nov 2016 14:02:28 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-set-mm-dd-yyyy-value-from-string-to-date-field/m-p/1911096#M568022</guid>
      <dc:creator>Abhinay Erra</dc:creator>
      <dc:date>2016-11-03T14:02:28Z</dc:date>
    </item>
  </channel>
</rss>

