Last active
December 10, 2019 07:08
-
-
Save ritacse/ad2168e1377275c1e55e8aa9327a2552 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DateTime firstDate = orderDt.AsEnumerable().Select(cols => cols.Field<DateTime>("Ship Date")).OrderBy(p => p.Ticks).FirstOrDefault(); | |
DateTime LastDate = orderDt.AsEnumerable().Select(cols => cols.Field<DateTime>("Ship Date")).OrderByDescending(p => p.Ticks).FirstOrDefault(); | |
DateTime maxDate = firstDate.AddMonths(1); | |
if (maxDate < LastDate) | |
{ | |
// Do something. | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var FromYear = DateTime.Parse(item.FromDate.ToString()).Year; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment