Datetime output diffrent in C# and MSSQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Metalzed
    New Member
    • Sep 2006
    • 27

    Datetime output diffrent in C# and MSSQL

    Hi I have a little problem

    If I use the this C# code
    Code:
    DateTime.Now.ToString()
    output = 2006-11-03 06:15:17

    But if i use this code in MSSQL
    Code:
    (CONVERT(VARCHAR(35), { fn NOW() }))
    output= Nov 3 2006 6:15AM

    How do I do to get " 2006-11-03 06:15:17 " instead of " Nov 3 2006 6:15AM " with MSSQL

    Not a big problem exept the chat looks very strange when it is diffrent time format at some places.
Working...