Storing a C# data of data type timestamp into sql server table and then perform SUM

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pugalenthi
    New Member
    • Jan 2007
    • 44

    Storing a C# data of data type timestamp into sql server table and then perform SUM

    I need to store a c# variable of data type timestamp into the SQL Server 2005 database. An example of how the variable value looks is as follows,

    00:00:01.500000 0

    It represents the hours:mins:seco nds

    Once i store a series of these values into the sql table, then i need to make a SUM of all these values. What would be the best datatype to use for this value. Please help me in this regard.
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    Until the guys come up with a better one, use varchar to store, then handle the conversion and calculation on retrieval.

    -- CK

    Comment

    Working...