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)