locked
CrmDateTime implementation RRS feed

  • Question

  • Hi all,

    If the CRM 4.0 Database store the date field as DateTime in SQL 2008, and the DateTime object accept dates before 1900, when the CRMDateTime object doesnt accept that ?

    any thoughts ?!!


    Moustafa Arafa
    Tuesday, July 28, 2009 6:24 PM

All replies

  • I can't dig up what CRMDateTime.MinValue equals but assuming it's 1900 as you sugsest what difference does it make if the data base can hold earlier dates?  The only way to the data base is through the CRMDateTime object.

    PS- what do you mean by DateTime object?  The .NET object?  It's not compatible with the CRMDateTime object.
    Tuesday, July 28, 2009 6:42 PM
  • Hi ,

    I mean by DateTime object the .Net object, and i know that the CRM is uses CRMDateTime object and not the .net object.

    my question is: if i want to store dates before 1900 Y, how can i do that since the interface in CRM 4.0 doesnt allow me to save this information.

    do the following: try to save the birthdate for a contact with this date 1/1/1800, you will get an error because the date year is below 1900.

    try and let me know.
    Moustafa Arafa
    Wednesday, July 29, 2009 1:41 PM
  • may be you can use nvarchar or int like 2009/07/20  20090720 and then convert it to DateTime.
    韓建興 http://jamson.cnblogs.com
    Wednesday, July 29, 2009 2:04 PM
  • I think the answer to your question is, you cannot.  I also have a hard time believing you've got contacts for your enterprise whose birthday is before the 20th century.  Something tells me that if the object can't handle the date neither can the date control -- i.e. the application is forcing you to store such information as a string.
    Wednesday, July 29, 2009 2:12 PM