I work on sql server 2017 i have date field name datelogged with datatype
my table structure as below
CREATE TABLE [dbo].[print_report](
[ID] [int] NOT NULL,
[datelogged] [datetime2](7) NULL,
CONSTRAINT [PK_print_report] PRIMARY KEY CLUSTERED
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
when copy date time value from excel to sql server 2017 time value changed .
why and how to prevent time value from changed from 12 hours to 24 hours.
What I have tried:
SELECT CONVERT(CHAR(11), DATEADD(DAY, 10, GETDATE()), 13);