Hi Team,
I am working on a project , I need to prepare a logic .
Logic :
-
I have a list and list have these value
“2:00am, 4:00am, 7:00am, 9:00am, 12:00pm, 2:00pm, 4:00pm,7:00pm,10:00pm”
- Now 09:30PM
- I want to pick the time which is greater then current time in FIFO mode
- Remove that time
Can any one help on the same
Anil_G
(Anil Gorthi)
2
@yasir_khalil
Welcome to the community
You can use this
requiredtime = List.Where(function(x) DateTime.ParseExact(x,"hh:mmtt",System.Globalization.CultureInfo.InvariantCulture) > Now)(0)
Cheers
Anil_G
(Anil Gorthi)
4
@yasir_khalil
Its parseexact…I gave an extra t
Cheers
Its not reorganizing the list value
Anil_G
(Anil Gorthi)
6
@yasir_khalil
Given the format as per 09 if it is only 9 then please use h instead of hh
Cheers
List_Japanese.Where(function(x) DateTime.ParseExact(x,“hh:MMtt”,System.Globalization.CultureInfo.InstalledUICulture) > Now)(0)
This also tried
@Anil_G : Is this is linq query ?
Anil_G
(Anil Gorthi)
11
@yasir_khalil
Yes it is…
I am trying to compare each value with now and then get the first…ideally it would give all times whicha re greater …getting the first using index 0
Cheers
system
(system)
Closed
14
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.