Click here to Skip to main content
15,867,488 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi everyone,

I'm using GETDATE() in my database hosted on GoDaddy.
When I run
SQL
Select GETDATE()

it returns accurate time, but when it is triggered upon record insertion it inserts time as follows:
7/25/2021 12:00:00 AM

How do I address this?

What I have tried:

I have set the properties of the column to getdate() for automatic insertion
Posted
Updated 14-Aug-21 19:56pm
Comments
[no name] 14-Aug-21 18:42pm    
Sql server has "Date" (only) AND "DateTime" types; check your columns.
09hadi 14-Aug-21 18:57pm    
sorry I didnt look there. That worked. Thank you

1 solution

Answered only to remove from unanswered queue: solved by Gerry in comments.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900