Results 1 to 6 of 6

Thread: Incorrect Date Displayed for Email Sent

  1. #1
    jkitsmiller is offline Sugar Community Member
    Join Date
    May 2007
    Location
    Austin, TX
    Posts
    27

    Default Incorrect Date Displayed for Email Sent

    I am using the SurgarCRM email client so that it makes it easy to archive email when sent without going through extra steps.

    But I just noticed that when I sent an email it is logging a VERY incorrect date. See the image attached. I sent this email today 7/6/07 at about 0930. I checked the server date and time and it is correct.

    Running SugarCRM on Windows Server 2003 with MS SQL 2005.



    Any help would sure be appreciated.

    John

  2. #2
    jkitsmiller is offline Sugar Community Member
    Join Date
    May 2007
    Location
    Austin, TX
    Posts
    27

    Default Re: Incorrect Date Displayed for Email Sent

    I just want to add to this as I have been trying to figure out where else it is causing problems.

    In the previous example, when I click on the email with the wrong date, it simply goes to a blank page.

    I have been using the Sugar Outlook Plug-In also and archiving emails to contacts and opportunities.

    So I thought I would check to see if I had the same problem with email archived from that plug-in. As you can see the date is correctly set to the date of the email, but when I click on the email it goes to a blank screen also.



    Would really appreciate any help.

    John

  3. #3
    Deuce is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    California
    Posts
    66

    Default Re: Incorrect Date Displayed for Email Sent

    If you are running MS SQL server, see this thread: http://www.sugarcrm.com/forums/showthread.php?t=23708

  4. #4
    jkitsmiller is offline Sugar Community Member
    Join Date
    May 2007
    Location
    Austin, TX
    Posts
    27

    Default Re: Incorrect Date Displayed for Email Sent

    Thanks!

    I changed the line referenced at the end of that thread in email.php in \modules\Emails\

    The first time I went and looked at the same History it had changed the date/time to the correct date/time the email was sent this morning. See below.

    Before:



    After:



    But when I click on the emails to view them I still wind up with a blank screen. So I thought maybe it might have something to do with emails archived before the change was made. So I archived a Test email. Not only can I not view the newly archived email, but as you can see below the date is incorrect again!



    Help!!!

    John

  5. #5
    Deuce is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    California
    Posts
    66

    Default Re: Incorrect Date Displayed for Email Sent

    There's a couple of places in that file you need to make that change. Search through the file for date_start and you should be able to find the queries you need to change.

  6. #6
    jkitsmiller is offline Sugar Community Member
    Join Date
    May 2007
    Location
    Austin, TX
    Posts
    27

    Default Re: Incorrect Date Displayed for Email Sent

    Deuce, thanks so much for continuing to help.

    I made the changed as you referenced here
    ______________________________________

    I was fighting the same issue a while back... Replace the the line that reads
    $q = "SELECT date_start, time_start FROM emails WHERE id = '{$this->id}' AND deleted = 0";
    with
    $q = "SELECT convert(varchar, date_start, 101) as date_start, convert(varchar, time_start, 108) as time_start FROM emails WHERE id = '{$this->id}' AND deleted = 0";

    The issue here is that MS SQL does not have separate date and time data types, it is all datetime. The convert(xx,xx,101) plucks out just the date part, and the 108 grabs just the time part of the date.

    ---------------------------------------------------------------

    You mention searching for date_start, and I found lots of those, but what do I change those to?

    Thanks again for your help.

    John

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 2007-11-13, 02:51 PM
  2. Sugar Open Source 3.5.1 Available for Download
    By jnassi in forum Announcements
    Replies: 1
    Last Post: 2005-09-27, 06:43 AM
  3. Problem with Date format
    By nicolas in forum Help
    Replies: 1
    Last Post: 2005-05-19, 02:16 PM
  4. Incorrect Date on call logging
    By jhughes77 in forum Feature Requests
    Replies: 0
    Last Post: 2005-01-27, 08:38 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •