
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2017 02:09 PM
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.
Solved! Go to Solution.
Labels:
- Labels:
-
Report Center
1 ACCEPTED SOLUTION

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2017 03:40 PM
Hi,
To retrieve the date from a datetime field, you can use the cast function:
select cast(TimeGenerated as date), TimeGenerated from tblNtlog
To retrieve the date from a datetime field, you can use the cast function:
select cast(TimeGenerated as date), TimeGenerated from tblNtlog
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2017 03:40 PM
Hi,
To retrieve the date from a datetime field, you can use the cast function:
select cast(TimeGenerated as date), TimeGenerated from tblNtlog
To retrieve the date from a datetime field, you can use the cast function:
select cast(TimeGenerated as date), TimeGenerated from tblNtlog

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2017 02:17 PM
Answered my own question:
Convert(nvarchar(10),tblNtlog.TimeGenerated,120)
Convert(nvarchar(10),tblNtlog.TimeGenerated,120)
