score:2
Accepted answer
dim atquery = from e in entitycontext.vwsecappaudittoday
order by e.date_occurred, e.time_occurred
select new with {
.dateoccurred = e.date_occurred,
.timeoccurred = e.time_occurred,
.servername = e.server_name
}
dim q2 = from e in atquery.toarray()
select new auditentry with {
.eventtime = datetime.parseexact(trim(e.dateoccurred) & trim(e.timeoccurred), "yyyymmddhhmmss", cultureinfo.invariantculture),
.servername = e.servername
}
Source: stackoverflow.com
Related Query
- How can I create a DateTime value in a Linq Query?
- How can I create a dynamic LINQ query in C# with possible multiple group by clauses?
- How do I create a linq query that gets everything but a specific value
- How can I issue a LINQ query to a SQL Server to check if a column value starts with a word?
- How can I create a method that will print LINQ query results?
- How can I create a join like query using LINQ and check for a propery in a child object?
- How can I get LINQ to return the object which has the max value for a given property?
- Linq Query keeps throwing "Unable to create a constant value of type System.Object....", Why?
- Why does C# compiler create private DisplayClass when using LINQ method Any() and how can I avoid it?
- How can I set properties on all items from a linq query with values from another object that is also pulled from a query?
- How to create LINQ Query from string?
- How do you return a default value if a LINQ to entities query returns no values
- How can I create a conditional where clause using LINQ
- How can I trace the query produced by the documentdb Linq provider?
- How can I convert DateTime to String in Linq Query?
- How can I build Linq query with dynamic OR statements?
- How can I convert this SQL Query into LINQ (OVER (PARTITION BY Date))
- How can I select items with Linq by Date while ignoring Time portion of a DateTime property?
- How can I calculate sum of column value in linq to sql query?
- How can I average a DateTime field with a LINQ query?
- LINQ how to query if a value is between a list of ranges?
- How can I get LINQ to return the index of the object which has the max value in a collection?
- How can I view the Entity Framework LINQ query plan cache?
- how do i use group by only on date from datetime in LINQ query
- How can I make my Linq select return values if the value selected is null?
- How can I determine if a LINQ query is going to be LINQ to SQL vs. LINQ to Objects?
- How can I tell when a LINQ query is enumerated?
- How can I use Linq to create an IEnumerable based on line breaks in a string?
- How can i use linq for parsing string datetime to real datetime?
- How can I write the following code more elegantly using LINQ query syntax?
More Query from same tag
- sqlLinq Take higher RN number
- Would you abstract your LINQ queries into extension methods
- Search In claims
- How to refresh a C# DataTable with updated data due to adding to table with autoincrement?
- Convert data collection into nested hierarchical object list
- CopyToDataTable in LINQ
- Replacing empty values with a default value in a Linq to Entities query
- Correct way of using the 'using' statement in Entity Framework
- Trying to use LINQ to check if a BitmapSource exists in a List<BitmapSource>
- LINQ-to-XML to DataGridView: Cannot edit fields -- How to fix?
- Close all MDI child windows using Linq
- count of last item of the day
- TimeSpan difference between elements in List
- How do I remove the foreach from this linq code?
- LINQ to DataTable Join Query using OR condition
- Can this be refactored into nicey nice LINQ?
- DataColumn: combine columns and values into a string
- Reading an XML document with Linq
- How to pass in a list of generic objects into a method?
- Select max date inside a list according by user id
- C# LINQ compound ordering on 3 columns
- Load selective XML data into Dataset using C#
- How to sum a custom object with LinQ?
- EntityFramework: Add Where clause to ObjectSet Query to Select on CHILD attributes
- Perform LINQ operations on an Enum based on Attributes
- Sort collection within collection using Linq
- Linq results based on a property of an object in a inner list
- How to intercept and modify SQL query in Linq to SQL
- Help with linq query
- Runtime error while using a linq query