Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

get all records created today when date is formatted as UTC

$
0
0

How can I get all the records that were created today when the createDate has UTC time stored in it?

example:

2020-01-30 13:00:30.33

I just want the record if it was created today (1-30-2020) 

My where clause:

var x = db.SalesRecords
    .Where(x.CreatedDate == DateTime.Today)

Is there a way to pass to get only today's records no matter the format in the table?


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>