locked
Date type in Entity designer changes to datetime type when deployed to SQL Server RRS feed

  • Question

  • One annoying issue I have is a date type field in the entity designer ends up as a datetime field when deployed to SQL Server. This is using Lightswitch of course.  Thanks in advance for any guidance

    Vern Miller

    Saturday, January 11, 2014 4:07 PM

Answers

  • The underlying type is datetime and the business type yourchoose is date. It is always datetime in localdb at dev/debug time, so schema is not changing on deployment.

    Dave


    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.


    • Edited by Xpert360 Saturday, January 11, 2014 4:42 PM
    • Marked as answer by Angie Xu Tuesday, January 21, 2014 6:51 AM
    Saturday, January 11, 2014 4:41 PM

All replies

  • The underlying type is datetime and the business type yourchoose is date. It is always datetime in localdb at dev/debug time, so schema is not changing on deployment.

    Dave


    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.


    • Edited by Xpert360 Saturday, January 11, 2014 4:42 PM
    • Marked as answer by Angie Xu Tuesday, January 21, 2014 6:51 AM
    Saturday, January 11, 2014 4:41 PM
  • Thanks, so unless I misunderstand there is no way to get around it? 

    Vern Miller

    Saturday, January 11, 2014 4:44 PM
  • Yes. Would be nice for the intrinsic database to support some more types. If you connect to an external database I don't know how the other date/time sql types are treated. Should be an easy test if you want more control other the database.

    Dave


    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.


    • Edited by Xpert360 Saturday, January 11, 2014 4:49 PM
    Saturday, January 11, 2014 4:48 PM