You can get Int64 value by duration.value and convert 'by hand' from there.
A possibility to convert from Millisecond to DateTime would be nice...
On Saturday, August 15, 2015 at 2:41:04 AM UTC+3, Ian Butterworth wrote:
Trying to get the number of hours between these two dates (ideally x
https://lh3.googleusercontent.com/-ozWWsLO25j8/Vc8HjJQDDTI/AWY/aKAqTYCKOOo/s1600/%2521yikes%2521.png
Good morning, .. and
I expected that would work .. that the period operators would cooperate
differently.
You deserve a more satisying introduction to basic stuff with time
intervals.
On Saturday, August 15, 2015 at 5:59:36 AM UTC-4, Kaj Wiik wrote:
You can get Int64 value by duration.value and convert 'by hand' from
there. A possibility to convert from Millisecond to DateTime would be
nice...
There should be
durationAB = DateTimeB - DateTimeA
Ian --
I can imagine a long-winded solution where the relevant time units are
extracted and differenced, but I was hoping for simpler.. -- as you
should!
When I saw you use Hour in the first example, I thought you were doing some
thing where hour counts were the focus ... (I will prepare
well that's accurate -- I was not trying to make them nefarious, I mistook
the emphasis.
I will come back with a more fully driveable example in about 15mins.
On Friday, August 14, 2015 at 7:41:04 PM UTC-4, Ian Butterworth wrote:
Trying to get the number of hours between these two dates
If you email me a description of how it had been planned to word (doing
what, using which underpinning funs) .. , I will give that a go.
On Sat, Aug 15, 2015 at 1:00 PM, Jacob Quinn quinn.jac...@gmail.com wrote:
Yeah, it's forthcoming. I left it out originally just to be conservative
in code
Thanks guys. I ended up using Kaj's approach. Functionality like we
discussed would be good if possible.
On Saturday, 15 August 2015 06:16:09 UTC-4, Jeffrey Sarnoff wrote:
What would like two lines of code to do with durations?
On Friday, August 14, 2015 at 7:41:04 PM UTC-4, Ian Butterworth
Yeah, it's forthcoming. I left it out originally just to be conservative in
code and function, but it's come up enough that we should add it in for
TimePeriods. A good up for grabs kind of PR if anyone's feeling up for it.
-Jacob
On Sat, Aug 15, 2015 at 10:59 AM, Ian Butterworth
Dates.Hour, .. Dates.Millisecond what to put their parens around DateTime
entities only.
Dates.Year. .. Dates.Day are more open-minded, enparenning DateTime or Date
entities.
take 'em for a spin like this:
Dates.Hour(time_series[2]) - Dates.Hour(time_series[1])
Here's to a Good Evening
I took 'em for a spin, but your approach doesn't have legs if the datetimes
in time_series come from different days. I.e. Dates.Hour just returns the
hour in that day.
I can imagine a long-winded solution where the relevant time units are
extracted and differenced, but I was hoping for
10 matches
Mail list logo