Question

i am trying to save (using linq) the date and time to an SQL field (datetime data type) using Datetime.Now but the seconds are not coming through. Does anyone know how to rig that up?

Ta.

Was it helpful?

Solution 2

As i was using a smalldatetime data field initally i forgot to update my data access layer (linq) after i changed it to datetime. Updating the linq data context has solved my problem. Thanks all.

OTHER TIPS

It works fine for me with DateTime.Now. I only have problems with millisecond precision due to the different way how SQL server stores the date.

What type has the SQL table column for your date? Can it store seconds?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top