Click here to Skip to main content
15,885,985 members
Home / Discussions / C#
   

C#

 
AnswerRe: Convert DateTimeOffset to DateTime in Linq To Entities Pin
Pete O'Hanlon16-Jan-17 22:52
mvePete O'Hanlon16-Jan-17 22:52 
GeneralRe: Convert DateTimeOffset to DateTime in Linq To Entities Pin
Kevin Marois17-Jan-17 5:08
professionalKevin Marois17-Jan-17 5:08 
GeneralRe: Convert DateTimeOffset to DateTime in Linq To Entities Pin
Kevin Marois17-Jan-17 5:54
professionalKevin Marois17-Jan-17 5:54 
GeneralRe: Convert DateTimeOffset to DateTime in Linq To Entities Pin
Pete O'Hanlon17-Jan-17 5:56
mvePete O'Hanlon17-Jan-17 5:56 
GeneralRe: Convert DateTimeOffset to DateTime in Linq To Entities Pin
Kevin Marois17-Jan-17 5:57
professionalKevin Marois17-Jan-17 5:57 
AnswerRe: Convert DateTimeOffset to DateTime in Linq To Entities Pin
Richard Deeming17-Jan-17 2:34
mveRichard Deeming17-Jan-17 2:34 
GeneralRe: Convert DateTimeOffset to DateTime in Linq To Entities Pin
Kevin Marois17-Jan-17 5:19
professionalKevin Marois17-Jan-17 5:19 
GeneralRe: Convert DateTimeOffset to DateTime in Linq To Entities Pin
Richard Deeming17-Jan-17 8:29
mveRichard Deeming17-Jan-17 8: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 10:53
abboudi_ammar16-Jan-17 10:53 
AnswerRe: Show checkbox check in the datagridview line Pin
Richard MacCutchan16-Jan-17 21:37
mveRichard MacCutchan16-Jan-17 21:37 
QuestionHow can I extract positive word(s) from a paragraph in c# -Natural Language processing . Pin
Nowfal Sharafudeen16-Jan-17 1:09
Nowfal Sharafudeen16-Jan-17 1:09 
AnswerRe: How can I extract positive word(s) from a paragraph in c# -Natural Language processing . Pin
Pete O'Hanlon16-Jan-17 1:21
mvePete O'Hanlon16-Jan-17 1:21 
AnswerRe: How can I extract positive word(s) from a paragraph in c# -Natural Language processing . Pin
Eddy Vluggen16-Jan-17 2:48
professionalEddy Vluggen16-Jan-17 2:48 
Questionproject file associated with c# application on start Pin
Member 1104538814-Jan-17 22:40
Member 1104538814-Jan-17 22:40 
AnswerRe: project file associated with c# application on start Pin
Eddy Vluggen15-Jan-17 0:52
professionalEddy Vluggen15-Jan-17 0:52 
GeneralRe: project file associated with c# application on start Pin
Member 1104538815-Jan-17 1:01
Member 1104538815-Jan-17 1:01 
GeneralRe: project file associated with c# application on start Pin
Eddy Vluggen15-Jan-17 1:06
professionalEddy Vluggen15-Jan-17 1:06 
GeneralRe: project file associated with c# application on start Pin
Member 1104538815-Jan-17 1:10
Member 1104538815-Jan-17 1:10 
GeneralRe: project file associated with c# application on start Pin
Eddy Vluggen15-Jan-17 1:24
professionalEddy Vluggen15-Jan-17 1:24 
GeneralRe: project file associated with c# application on start Pin
Member 1104538815-Jan-17 1:48
Member 1104538815-Jan-17 1:48 
GeneralRe: project file associated with c# application on start Pin
OriginalGriff15-Jan-17 1:23
mveOriginalGriff15-Jan-17 1:23 
GeneralRe: project file associated with c# application on start Pin
Eddy Vluggen15-Jan-17 1:25
professionalEddy Vluggen15-Jan-17 1:25 
QuestionCan't understand implementation of interface Pin
Mc_Topaz14-Jan-17 3:07
Mc_Topaz14-Jan-17 3:07 
AnswerRe: Can't understand implementation of interface Pin
OriginalGriff14-Jan-17 3:48
mveOriginalGriff14-Jan-17 3:48 
PraiseRe: Can't understand implementation of interface Pin
Mc_Topaz14-Jan-17 4:35
Mc_Topaz14-Jan-17 4: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.