Results 1 to 5 of 5

Thread: MySQL error 1292: when converting a Lead

  1. #1
    Deland01 is offline Sugar Community Member
    Join Date
    Sep 2006
    Posts
    66

    Default MySQL error 1292: when converting a Lead

    Hi,

    I have a verry unusual error when ever I try to convert a Lead. The strange thing is I only get the error if I have a call, meeting or task attached to the Lead.

    The error I get is:


    Query Failed:INSERT into calls set id='617f0c31-eabb-9bb0-466a-46531f98d1d9', date_entered='22-05-2007 17:49', date_modified='2007-05-22 16:49:49', assigned_user_id='1', modified_user_id='1', created_by='1', name='zdgzsdgtsdzt', duration_hours='1', duration_minutes='0', date_start='2007-05-31', time_start='17:00:00', date_end='2007-05-31', parent_type='Accounts', status='Held', direction='Outbound', parent_id='8b09e11e-e740-248c-64cb-46531ffb47d9', description=null, deleted='0', reminder_time='600', outlook_id=null::MySQL error 1292: Incorrect datetime value: '22-05-2007 17:49' for column 'date_entered' at row 1



    If I chose to create an opportunity whilst converting the Lead, or an account and schedule a meeting or call or do all 3 it will still create them but I see th above message. Can anyone point me in the right direction?



    .
    Sugar Version - 4.5.0h
    Sugar Edition - SugarSuite
    OS - Win 2003 Server Std
    PHP Version - 5.2.0
    Database - MySQL Server 5
    Web Server - Apache 2.0.59

  2. #2
    Markku's Avatar
    Markku is offline Sugar Community Member
    Join Date
    Nov 2004
    Location
    Helsinki
    Posts
    910

    Default Re: MySQL error 1292: when converting a Lead

    Have you changed the date format to your own?

    The problem seem to be that you are trying to insert date as dd-mm-yyyy format, but MySQL does not accept it.

    This is the error:
    Code:
    Incorrect datetime value: '22-05-2007 17:49' for column 'date_entered'
    on the other hand, date modified in the SQL statement works fine (note the format yyyy-mm-dd):
    Code:
    date_modified='2007-05-22 16:49:49',
    Try to change the default dateformat to yyyy-mm-dd in admin panel and see if it helps.

  3. #3
    Deland01 is offline Sugar Community Member
    Join Date
    Sep 2006
    Posts
    66

    Default Re: MySQL error 1292: when converting a Lead

    Markku,

    you are a super star once again. I already checked out the locale date settings but didn't have much luck. After what you said the light bulb came on & I also checked each user's account settings & guess what..... they had the wrong date format.

    I've changed all the settings to yyyy-mm-dd and it works fine. Any suggestions how I can change the date format in SQL, presuming its the SQL side thats set up as yyyy-mm-dd?

    I have a funny feeling people will moan at me if its not in dd-mm-yyy.
    Sugar Version - 4.5.0h
    Sugar Edition - SugarSuite
    OS - Win 2003 Server Std
    PHP Version - 5.2.0
    Database - MySQL Server 5
    Web Server - Apache 2.0.59

  4. #4
    roxmass is offline Junior Member
    Join Date
    Feb 2007
    Posts
    1

    Default Re: MySQL error 1292: when converting a Lead

    hi, i'm mass, from italy.

    the solution of markku works, but it's a workaround.

    the new sugar version, 5.0.0 beta1, has the same problem, and it affects only "date_entered" field of calls table, the others datetime fields appears correctly in the insert query, regardless of user setting of date format.

    imho it's a bug.

    nobody know about it?

    i apologize for my poor english...

  5. #5
    Markku's Avatar
    Markku is offline Sugar Community Member
    Join Date
    Nov 2004
    Location
    Helsinki
    Posts
    910

    Default Re: MySQL error 1292: when converting a Lead

    Let's wait for 5.0 beta 2, maybe it has been fixed.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. MySQL Database Not Available
    By luisamato in forum Help
    Replies: 4
    Last Post: 2007-06-27, 05:58 AM
  2. Huge backups -- normal?
    By Liam in forum Help
    Replies: 5
    Last Post: 2007-05-02, 05:36 AM
  3. From lead to order
    By george_bbch in forum Feature Requests
    Replies: 0
    Last Post: 2006-09-26, 02:02 PM
  4. MySQL error/no workflow notifications
    By rlbyrd in forum Help
    Replies: 1
    Last Post: 2006-09-11, 09:14 PM
  5. mysql error when converting lead 3.0b
    By obuwebco in forum General Discussion
    Replies: 0
    Last Post: 2005-05-09, 06:43 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
  •