View Single Post
Old 01-27-2019, 11:35 PM   #7
Newly Registered User
Join Date: Jan 2019
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
vedika is on a distinguished road
Re: How to insert date and time into access

You may try this code to insert data and time in MS Access using VB.Net

Dim purchasedatetime As Date = System.DateTime.Now
Str = "Insert into Customer_Order (Order_Date) values (@Order_Date)"
cmd = New OleDbCommand(Str, cn)
'open the connection
With cmd
.parameters.addwithvalue("@order_Date", purchasedatetime)
End With

vedika is offline   Reply With Quote