Java Script: How to ammend a datetime variable to set a specific time?
<p>I need to take a datetime values from an MSSQL based app which is read into the script as 22/12/2010 3:56pm and adjsut the time component toa  set time.</p>

<p>I've used what I know of javascript and what I can find in google searches to try and progress this but to no avail.</p>

<p>Premis: I need to read the date time value and  set the time portion of the date to 8am, 1pm or 4pm dependent on another field. </p>

<p>The conditional logic portion of the script is fine the date functions aren't so fine.</p>

<p>Current code I'm currently using:  </p>

<pre><code>      if(fldPriority.Value=='2')
   {
    var ResDate = new Date(fldTargetResolutionTime.Value);
    var newdate = new Date(ResDate.getYear(),ResDate.GetMonth(),ResDate.GetDay(),16,0,0,0);

    objReturn = newdate
   }
</code></pre>

<p>Problem:
The date reads in originally in gmt format 22/12/2010 3:56pm but then gets changes to utc format and the date changes significantly to Wed Oct 12 15:56:00 UTC+12 2011</p>

<p>Any help would be greatly appreciated.</p>
