Click here to Skip to main content
15,847,583 members
Home / Discussions / C#
   

C#

 
AnswerRe: Convert DateTimeOffset to DateTime in Linq To Entities Pin
Pete O'Hanlon16-Jan-17 23:52
subeditorPete O'Hanlon16-Jan-17 23:52 
GeneralRe: Convert DateTimeOffset to DateTime in Linq To Entities Pin
Kevin Marois17-Jan-17 6:08
professionalKevin Marois17-Jan-17 6:08 
GeneralRe: Convert DateTimeOffset to DateTime in Linq To Entities Pin
Kevin Marois17-Jan-17 6:54
professionalKevin Marois17-Jan-17 6:54 
GeneralRe: Convert DateTimeOffset to DateTime in Linq To Entities Pin
Pete O'Hanlon17-Jan-17 6:56
subeditorPete O'Hanlon17-Jan-17 6:56 
GeneralRe: Convert DateTimeOffset to DateTime in Linq To Entities Pin
Kevin Marois17-Jan-17 6:57
professionalKevin Marois17-Jan-17 6:57 
AnswerRe: Convert DateTimeOffset to DateTime in Linq To Entities Pin
Richard Deeming17-Jan-17 3:34
mveRichard Deeming17-Jan-17 3:34 
GeneralRe: Convert DateTimeOffset to DateTime in Linq To Entities Pin
Kevin Marois17-Jan-17 6:19
professionalKevin Marois17-Jan-17 6:19 
GeneralRe: Convert DateTimeOffset to DateTime in Linq To Entities Pin
Richard Deeming17-Jan-17 9:29
mveRichard Deeming17-Jan-17 9:29 
So you want the rows where the local value of the DateTimeOffset is after a particular DateTime value?

Seems a bit strange to me, but you should be able to do something like this:
C#
// Extract the date parts, so that EF doesn't try to convert the properties to SQL:
int startYear = startDT.Year;
int startMonth = startDT.Month;
int startDay = startDT.Day;
int startHour = startDT.Hour;
int startMinute = startDT.Minute;
int startSecond = startDT.Second;

...
where t.Started >= EntityFunctions.CreateDateTimeOffset(
    startYear, startMonth, startDay, startHour, startMinute, startSecond, 
    SqlFunctions.DatePart("tz", t.Started))
...


EntityFunctions is defined in System.Data.Entity.Core.Objects in the EntityFramework assembly;
SqlFunctions is defined in System.Data.Entity.SqlServer in the EntityFramework.SqlServer assembly.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


QuestionShow checkbox check in the datagridview line Pin
abboudi_ammar16-Jan-17 11:53
abboudi_ammar16-Jan-17 11:53 
AnswerRe: Show checkbox check in the datagridview line Pin
Richard MacCutchan16-Jan-17 22:37
mveRichard MacCutchan16-Jan-17 22:37 
QuestionHow can I extract positive word(s) from a paragraph in c# -Natural Language processing . Pin
Nowfal Sharafudeen16-Jan-17 2:09
Nowfal Sharafudeen16-Jan-17 2:09 
AnswerRe: How can I extract positive word(s) from a paragraph in c# -Natural Language processing . Pin
Pete O'Hanlon16-Jan-17 2:21
subeditorPete O'Hanlon16-Jan-17 2:21 
AnswerRe: How can I extract positive word(s) from a paragraph in c# -Natural Language processing . Pin
Eddy Vluggen16-Jan-17 3:48
professionalEddy Vluggen16-Jan-17 3:48 
Questionproject file associated with c# application on start Pin
Member 1104538814-Jan-17 23:40
Member 1104538814-Jan-17 23:40 
AnswerRe: project file associated with c# application on start Pin
Eddy Vluggen15-Jan-17 1:52
professionalEddy Vluggen15-Jan-17 1:52 
GeneralRe: project file associated with c# application on start Pin
Member 1104538815-Jan-17 2:01
Member 1104538815-Jan-17 2:01 
GeneralRe: project file associated with c# application on start Pin
Eddy Vluggen15-Jan-17 2:06
professionalEddy Vluggen15-Jan-17 2:06 
GeneralRe: project file associated with c# application on start Pin
Member 1104538815-Jan-17 2:10
Member 1104538815-Jan-17 2:10 
GeneralRe: project file associated with c# application on start Pin
Eddy Vluggen15-Jan-17 2:24
professionalEddy Vluggen15-Jan-17 2:24 
GeneralRe: project file associated with c# application on start Pin
Member 1104538815-Jan-17 2:48
Member 1104538815-Jan-17 2:48 
GeneralRe: project file associated with c# application on start Pin
OriginalGriff15-Jan-17 2:23
mveOriginalGriff15-Jan-17 2:23 
GeneralRe: project file associated with c# application on start Pin
Eddy Vluggen15-Jan-17 2:25
professionalEddy Vluggen15-Jan-17 2:25 
QuestionCan't understand implementation of interface Pin
Mc_Topaz14-Jan-17 4:07
Mc_Topaz14-Jan-17 4:07 
AnswerRe: Can't understand implementation of interface Pin
OriginalGriff14-Jan-17 4:48
mveOriginalGriff14-Jan-17 4:48 
PraiseRe: Can't understand implementation of interface Pin
Mc_Topaz14-Jan-17 5:35
Mc_Topaz14-Jan-17 5:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.