date formart

  • The date is stored in my DB as a numeric 9(18,9) data type .How can i convert that value into regular data type

    HEre are the two dates in my DB.How can i change this into regular data formart.

    37774.98856

    37728.38941

    Thanks.

  • Wow! That's a strange way to keep dates and times.  First you have to tell us how to interpret the datetime value you have as a decimal. In other words, what is the date and time value for each of these:

    37774.98856

    37728.38941

    -SQLBill

  • Hi,

    if your rule is as the system datetime format,  (i.e. integer part = date and decimal part = nb secondes since 00:00), you can just use :

    select cast(37774.98856 as datetime) as test1 , cast(37728.38941 as datetime) as test2

    which will give :

    test1                      test2                                         

    -------------------------  ------------------------------------------------------

    2003-06-04 23:43:31.583    2003-04-19 09:20:45.023

    bye.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply