Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

How can i save to a datetime field without milliseconds

$
0
0

Hello !

I'm trying to save a datetime value from vb.net to a sql server.

I'm using this code :

Dim dt As DateTime = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss")
 After I save this value to Database.

But on sql server management studio , I see that the field's value still has the milliseconds .

What can I do.

Thank you !


Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>