Tag Info

New answers tagged

1

Wolfram has confirmed that this is a bug.


2

{60., 1, 1/60}.DateList[#][[4 ;;]] & /@ {"12:41:43", "15:35:40", "18:28:38", "21:21:40", "0:14:51", "3:07:51", "6:00:43", "8:52:17", "11:43:53", "14:35:26", "17:25:18", "20:15:13"} yields: (* {761.717, 935.667, 1108.63, 1281.67, 14.85, 187.85, 360.717, 532.283, \ 703.883, 875.433, 1045.3, 1215.22} *)


2

times={"12:41:43", "15:35:40", "18:28:38", "21:21:40", "0:14:51", "3:07:51", "6:00:43", "8:52:17", "11:43:53", "14:35:26", "17:25:18", "20:15:13"}; time0 = "00:00:00"; minutes = QuantityMagnitude @ DateDifference[time0, #, "Minute"]& /@ times {761.717, 935.667, 1108.63, 1281.67, 14.85, 187.85, 360.717, 532.283, 703.883, 875.433, ...


1

In version 10, I think that much of the behavior is simply a difference between how the year 0 is handled by astronomers (and therefore the page you were getting Julian Dates from) and everybody else. For example, take this calculation: jd[{-3000, 11, 24, 12, 0, 0}] - 625660 I believe that you have actually pulled the wrong number from the website due to ...


3

You can get the value in number of minutes since midnight. I not certain if this is the same as formatting a time to decimal in Excel. You have a time format as a string so can StringSplit these into their components and convert them to from strings to integers with FromDigits. This will give a matrix of vectors with {hour, minute, second} entries. These ...


4

Here's a simple fix/workaround. It appears that all you need to do to make your code work as intended is to make the following change to your $dateFormat assignment: $dateFormat = {"Year", "", "Month", "", "Day", "", "Hour"} This generates an identical string to your test example, but it appears that the empty strings are necessary to correctly parse the ...


0

I am not sure I understand the constraints of this question if there are any. But would this work: Map[ Function[ DateString[DatePlus[ DateList[{ToExpression[StringTake[ToString[#1], 4]], 1, 1}], {(ToExpression[StringTake[ToString[#1], -3]] - 1), "Day"}], {"Year", "Month", "Day"}]], dateslalala]


8

Perhaps, using: dateslalala={2003364, 2003157, 2003314, 2003302, 2003181, 2003062, 2003254, \ 2003070, 2003365, 2003338, 2003233, 2003073, 2003020, 2003010, \ 2003238, 2003107, 2003310, 2003347, 2003204, 2003066, 2005364, \ 2005157, 2005314, 2005302, 2005181, 2005062, 2005254, 2005070, \ 2005365, 2005338, 2005233, 2005073, 2005020, 2005010, 2005238, \ ...


1

The thought is DatePlus. split[x_Integer] := {{FromDigits@#[[1 ;; 4]], 1, 1}, FromDigits@#[[5 ;; -1]]} &@IntegerDigits[x] split[2003305] (* {{2003,1,1},305} *) DatePlus[split[2003305][[1]], 305] (* {2003,11,2} *) f = Block[{$DateStringFormat = {"Year", "Month", "Day"}, res}, res = split[#]; DatePlus[res[[1]], res[[2]] - 1]] ...



Top 50 recent answers are included