locked
SQLite handles DateTime

    Question

  • I need some confirmation this is how SQLite handles DateTime DataType  in WinRT :

      1) For DateTime.Today

         SQLite will convert it into string as  yyyy-MM-dd hh:mm:ss 

         BUT hh:mm:ss  will always be 00:00:00

        example :  mm/dd/yyyy 2/12/2014 will be  2014-2-12 00:00:00

    2) For DateTime.Now

       Will SQLite convert the time part exactly.

      Example   SQLite will convert   DateTime.Now  to ( example 2/12/2014 : 13:30:23   ) , the time part time :hh:mm:ss will not be zero like 00:00:00

    Thanks

    Wednesday, February 12, 2014 2:59 AM

Answers

  • Hi FireDance,

    Yes, that's correct.

    Take a look at Today Property, the object that is set to today's date, with the time component set to 00:00:00. While Now Property will set an object whose value is the current local date and time.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by FireDance Wednesday, February 12, 2014 5:31 AM
    Wednesday, February 12, 2014 4:14 AM
    Moderator

All replies

  • Hi FireDance,

    Yes, that's correct.

    Take a look at Today Property, the object that is set to today's date, with the time component set to 00:00:00. While Now Property will set an object whose value is the current local date and time.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by FireDance Wednesday, February 12, 2014 5:31 AM
    Wednesday, February 12, 2014 4:14 AM
    Moderator
  • Thank u James for the confirmation.
    Wednesday, February 12, 2014 5:32 AM