New answers tagged

7

This is the purpose of the TemporalRegularity option. TemporalRegularity is an option for TemporalData, TimeSeries, and EventSeries that controls whether the paths are assumed to be uniformly spaced in time. When setting this option, the dates themselves are ignored and a standard index {0,1,...,n} is used in its place, allowing for non-uniform ...


1

I could not find a way to prevent the addition, so you might be left with cleaning up after the fact. Depending on which side you control, you could either add the missing bits, or remove the excess. If you want to add the missing parts: datComplete = {DateObject[{2007, 1, #}, TimeObject[{0, 0, 0}], TimeZone -> $TimeZone], #} & /...


2

You may use GroupBy and DateValue. However, you need to convert your SQLDateTimes (from Needs["DatabaseLink`"]) to standard DateObjects. This can be done on the fly so your dataset keeps the SQLDateTime objects. dsResult = ds[ SortBy["Date"] /* GroupBy[ DateValue[ Replace[SQLDateTime[d_] :> DateObject@d]@#"Date", {"Year"...


5

The result we see is due to a somewhat baffling formatting decision made within the machinery that generates the box form of datasets. When formatting a date object, it uses DateString form. However, it also expressly checks to see whether the date has three components. If so, it drops the first four characters from the string form. This is strange and I ...


2

Here is a simple and universal function which formats timings (for real-time monitoring of elapsed time one should replace Round with Floor): formatTiming = StringJoin[{If[# >= 100, ToString@#, IntegerString[#, 10, 2]] &@Floor[#/3600], ":", IntegerString[Floor[Mod[#, 3600]/60], 10, 2], ":", IntegerString[Mod[#, 60], 10, 2]} &@...



Top 50 recent answers are included