Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
40
Answers
Get the Total Count of TimeStamp in LINQ
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
TAN WhoAMI
11y
2.6k
1
Reply
in SQL, I am able to get the total count of different timestamp of its date as shown below.
the data is also attached. How do I have it in C# LINQ?
I try below, it does not return value of 3, but total number of different times. I need to have the word trunc in LINQ. thanks.
int TotalDays = (from p in context.PPL_PRODUCT_TESTID2
where p.MONO == Mono && p.ITNO == PartNo && p.SYSTEMTYPE == "0036" && p.TESTFLAG == 1
select p.TIMESTAMP).Distinct().Count(); // all timestamp MO
Attachment:
example.rar
Post
Reset
Cancel
Answers (
40
)
Next Recommended Forum
Convert LINQ C# to normal C# code
Query not returning results