Note that there are some explanatory texts on larger screens.

plurals
  1. POupdate_attributes issue - all dates being passed as time and not datetime
    primarykey
    data
    text
    <p><strong>Using RAILS 2.2</strong></p> <p>Hello</p> <p>I am having an issue where my dates are being set to Time.now when I update a call. This is because the Update statement is only passing the time, not the datetime.</p> <p>You can see bellow </p> <ul> <li>[Issuereported_date] = '11:36:00'</li> <li>[Issuelogged_Date] = '11:36:56'</li> </ul> <p>The time that is being passed isn't random, it is the time part of the datetime which should have been passed.</p> <pre><code>Processing IssuesController#update_general (for localhost at 2012-03-02 11:38:53) [POST] Session ID: BAh7CzoPYZWR7ADoOY2xpcjo6Rmxhc2g6OkZsYXNo%0ASGFzaHsABjoKQHVzZWR7ADoOY2xpZW50X2lkaQY6D0ASGFzaHsABjoKQHVzZWG9yIFdpbGxpYW1z--29udGFjdF9pZGHVz Parameters: {"commit"=&gt;"Save", "action"=&gt;"update_general", "id"=&gt;"0004", "controller"=&gt;"call/issues", "issue"=&gt;{"ResolutionID"=&gt;"", "EstFixDate"=&gt;"", "ResolutionVersion"=&gt;"", "SeverityID"=&gt;"3", "ResolutionNotes"=&gt;"", "StatusID"=&gt;"1", "Issuelogged_Date"=&gt;"2012-02-12 11:36:56", "CallTypeID"=&gt;"1", "IssueBody"=&gt;"sdg", "Emailsent"=&gt;"1", "IssueHeader"=&gt;"td", "UserID"=&gt;""}} [4;35;1mSQL (0.000000)[0m [0mSELECT c.COLUMN_NAME as ColName, c.[DEFAULT] as DefaultValue, d.DOMAIN_NAME as ColType, c.WIDTH as Length FROM SYS.SYSCOLUMN c key join (sys.systable t,sys.sysdomain d) WHERE t.TABLE_NAME = 'Contact' ORDER BY column_id[0m [4;36;1mContact Load (0.000000)[0m [0;1mSELECT TOP 1 * FROM Contact WHERE (Contact.[ContactID] = 12311) [0m [4;35;1mSQL (0.000000)[0m [0mSELECT c.COLUMN_NAME as ColName, c.[DEFAULT] as DefaultValue, d.DOMAIN_NAME as ColType, c.WIDTH as Length FROM SYS.SYSCOLUMN c key join (sys.systable t,sys.sysdomain d) WHERE t.TABLE_NAME = 'CALL_Issue' ORDER BY column_id[0m [4;36;1mCall::Issue Load (0.000000)[0m [0;1mSELECT * FROM CALL_Issue WHERE (CALL_Issue.[IssueID] = '0004') [0m [4;35;1mSQL (0.000000)[0m [0mSELECT @@ROWCOUNT AS AffectedRows[0m [4;36;1mCall::Issue Update (0.015000)[0m [0;1mUPDATE CALL_Issue SET [IssueBody] = 'sdg', [LastEdited_By] = 12311, [Issuereported_date] = '11:36:00', [PlatformID] = NULL, [ApplicationID] = 387, [SLAMet] = 0, [HandHeldID] = NULL, [StatusID] = 1, [ResolutionNotes] = '', [SeverityID] = 3, [Comments] = NULL, [Emailsent] = 1, [ModuleID] = NULL, [Issuelogged_Date] = '11:36:56', [BeginProjectWork] = 0, [ResolutionVersion] = NULL, [EstFixDate] = NULL, [ClientUserID] = 12311, [ClientID] = 1, [IssueHeader] = 'td', [UserID] = NULL, [ClientComments] = NULL, [Issuelogged_by] = 12311, [CallTypeID] = 1, [priority] = 3, [IssueClientRef] = NULL, [ResolutionID] = NULL, [ClientSpecific] = 0, [IntComments] = NULL WHERE [IssueID] = 0004[0m Redirected to http://localhost:3000/call/issues/0004 Completed in 0.10900 (9 reqs/sec) | DB: 0.01500 (13%) | 302 Found [http://localhost:3000/call/issues/update_general/0004] </code></pre> <p>As you can see, I've tried setting the Issuelogged_Date in my update, although - same thing happens - it just passes the time, and not the datetime. </p> <p>I'm really stuck on what to do! Any help would be appreciated!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload