For e.g. current time is =>> 17/12/21 3:27 AM IST)
I want to cover previous 4 time ranges (11-12,12-1,1-2,2-3)
And I want my time Range variable to have below value
maybe your request was misinterpretated when understanding as you are looking for a datatype / structure reflecting a date with time and an addtional timespan.
Maybe a tuple will help on this:
Accessing the date: yourTupleVar.Item1 | DataType: DateTime
Accessing the timespan: yourTupleVar.Item1
Calculating the end
So remaining task is to calculate the timespan from
(11-12,12-1,1-2,2-3)
(7-8,8-9,9-10,10-11)
if the suggested approach will be of interest we can help on this as also. The first case looks to me as
but we would suggest to shift to the 1,2,3,4…12,13,14…23,0 hour enumeration if this would be possible