Time conversion issue

We have a field added to Oracle table as a Date type. When I select this field using the Query Database it displays the field 1 day less than how it is stored in database. For example; on the table it is "11-NOV-00", when I select it displays in variable as "11/10/2000 7:00PM", which is 1 day less. Also the date inserted into the table is correct, but when retrieve it is wrong. Does anyone know how this is happening? Also, the data type of the field is "Date Time" in the smart service properties output data tab. You can't change this... it gets that type from the database. Thanks!...

OriginalPostID-133097

OriginalPostID-133097

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer
    It sounds to me like you want to set your XSD to map this to a date, rather than datetime, field so it is consistent with how you are storing it in your DB. If you convert a date into a datetime, midnight GMT is the default time added, and when displayed in your local timezone this adjusts the date, which may cause unanticipated results if all you wanted was a date, rather than a timestamp.
Reply
  • 0
    Certified Senior Developer
    It sounds to me like you want to set your XSD to map this to a date, rather than datetime, field so it is consistent with how you are storing it in your DB. If you convert a date into a datetime, midnight GMT is the default time added, and when displayed in your local timezone this adjusts the date, which may cause unanticipated results if all you wanted was a date, rather than a timestamp.
Children
No Data