Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
laurin1
Engaged Sweeper III
Unable to figure this out. I've tried using the SQL Server Compact documentation, but I can't figure out which one to use and functions like CONVERT(date, <datecolumn) through date = unknown data type.
1 ACCEPTED SOLUTION
Tom_P
Lansweeper Employee
Lansweeper Employee
Hi,

To retrieve the date from a datetime field, you can use the cast function:

select cast(TimeGenerated as date), TimeGenerated from tblNtlog

View solution in original post

2 REPLIES 2
Tom_P
Lansweeper Employee
Lansweeper Employee
Hi,

To retrieve the date from a datetime field, you can use the cast function:

select cast(TimeGenerated as date), TimeGenerated from tblNtlog
laurin1
Engaged Sweeper III
Answered my own question:

Convert(nvarchar(10),tblNtlog.TimeGenerated,120)

Reports & Analytics

Ask about reports you're interested in and share reports you've created. Subscribe to receive daily updates of reports shared in the Community.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now