locked
SQL Server Time DataType RRS feed

  • Question

  • Are there any plans to support the new SQL Server 2008 Time datatype?  I have just started with WCF Data Services, and this issue will cause big headaches if Time will not be supported.

    Thanks


    Burton Roberts
    Saturday, December 31, 2011 7:17 PM

Answers

All replies

  • You can expose your a TimeSpan use the Ticks property as this link: http://stackoverflow.com/questions/5587433/how-do-i-expose-a-timespan-through-a-wcf-data-service


    I am fish.
    Monday, January 2, 2012 6:41 AM
  • Hi Burton,

    I am writing to check the status of the issue on your side. Would you mind letting us know the result of the suggestions?

    If you need further assistance, please feel free to let me know. I will be more than happy to be of assistance.

    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, January 13, 2012 1:39 AM
    Moderator
  • I apologize, I was thinking I'd get an email when there was a response.  I just saw this and haven't yet tried it. I'll get back to you asap.


    Burton Roberts

    Thursday, February 9, 2012 10:11 PM
  • Hello

    I do not believe the suggested solution applies to my situation.  The datatype on the server is Time(0) and represents Time of Day.  To expose it as minutes, for instance, I would have to do conversions on both sides of the wcf data service.  I could do it using views (out) and stored procedures (in), but,  it may be less trouble changing the datatype to smalldatetime, and to just ignore the Date part.  Unfortunately there is already some software written against these tables using ria services which handles the Time datatype no problem.  If I change the datatype I have to rewrite some of that code, too. 

    I have some time (no pun intended) before I have to face this issue with wcf data services, so I was asking if the Time datatype might be supported in the future so I could save myself the trouble of these changes and/or work arounds. 

    Thank you


    Burton Roberts

    Thursday, February 9, 2012 11:31 PM