TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
TAN WhoAMI
NA
291
0
Get the Total Count of TimeStamp in LINQ
Aug 18 2013 10:46 PM
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
Reply
Answers (
40
)
Convert LINQ C# to normal C# code
Query not returning results