Page 1 of 1
Odd date and time format
Posted: Mon Jul 10, 2017 2:27 pm
by Roberto
Hi,
Getting me a new Voltcraft CM2024 battery charger with logging options once again I ran into a device using a different time format.
This one uses day/hr:min
I changed this to day:hr:min at least to let DPlot open the file.
Now when playing with date scaling on x-axis it seems DPlot is assuming it to be something odd: I can not get the scaling right.
Any hints how to use a mixed date and time format in Dplot? It usually uses d-m-y or hr-min-sec but not both.
I intend to get a scaling of Days for major tick marks and (24) Hours for minor tick marks.
Roberto
Posted: Mon Jul 10, 2017 3:05 pm
by DPlotAdmin
Roberto,
With day:hr:min DPlot is probably assuming hr:min:sec when it reads the file. You can get what you want with some manipulation using Edit>Operate on X. Something like
X=floor(x/24) + floor(mod(x*24,24)/24 + floor(mod(x*24*60),24*60)/(24*60)
That's off the top of my head and probably contains an error, but I think you get the gist of it.
Posted: Tue Jul 11, 2017 12:30 pm
by Roberto
Hi David,
Oh, ok; I already suspected recalculations were required. I'll experiment with edit on X later.
DPlot is only accepting d-m-y OR hr-min-sec, right? There's no such thing as an all compassing format containing year down to (fractions of) seconds?
If the latter is an existing format perhaps I could 'find and replace' the initial file entries D/hr:min by e.g. Y:M: D :hr:min:sec while using zero's for the irrelevant variables.
Posted: Wed Jul 12, 2017 11:48 am
by DPlotAdmin
Roberto,
DPlot can read both, but you'll need to include the month, day, and year for dates as well as hours and minutes (as a minimum) for times. Also, the separators are different: Default separator for dates is /, : for times. You can change the date separator using Options>General (to anything other than : or the default decimal point). Time separator must be :.
In Excel this would be some variation of
m/d/yyyy h:mm AM/PM
Posted: Wed Jul 12, 2017 2:22 pm
by Roberto
Hi David,
What do you mean with some variation?
If Excel accepts this exact format: m/d/y hh:mm does it mean DPlot understands this combination (single) line of date and time as well (for x-axis scaling)?
Sorry; normally I would experiment with this but I chose the easy way of asking: currently my spare time is pretty minimal :-/
If DPlot does understand m/d/y hh:mm then I think the most practical solution is to edit the original file before import rather than using the quite tedious 'Operate on X' approach.
...update: a -final for today- test result after changing D/hh:mm to D-M-Y hh:min ...
Looks like DPlot does not accept such data:
00-07-17 23:57;DIS;7406;150;0,0;390,3;
00-07-17 23:58;DIS;7406;150;0,0;390,6;
00-07-17 23:59;DIS;7406;150;0,0;390,8;
01-07-17 00:00;DIS;7406;150;0,0;391,1;
01-07-17 00:01;DIS;7406;150;0,0;391,3;
01-07-17 00:02;DIS;7406;150;0,0;391,6;
Note: date format in DPlot was set to D-M-yy and decimal symbol to ','.
However, I only chose X for date/time and Y for column with integer values (7406 in the snippet above); disabled any other columns to plot)
Result is blank plot; looking at the data set there's only one record: dd/mm/yyyy hh:mm:ss with value 0 (instead of supposed 9499 for first record in imported file).
Posted: Thu Jul 13, 2017 9:01 am
by DPlotAdmin
What do you mean with some variation?
I mean that any of
m/d/yyyy h:mm AM/PM
mm/dd/yy HH:mm
mm/d/yyyyy hh:mm AM/PM, etc. will work.
(Or reverse the month and day, but to do that you first need to check the appropriate box under Options>General)
This:
00-07-17 23:57;DIS;7406;150;0,0;390,3;
did not work because the day is 1-based (as is the month). There is no day 0.
Posted: Thu Jul 13, 2017 3:12 pm
by Roberto
Hi David,
Ouch! Silly me having overlooked that

Was pretty tired when experimenting so that might be an excuse...
Almost there after replacing zero days! A graph showed up but with messed up days. Turned out DPlot really wants the import format in m-d-y rather than d-m-y which I initially set in the edited original file (regardless the setting in the Number Formats dialog).
Now changing the D/h:m date and time format to DPlot-friendly mm-dd-yy hh:mm in the initial log file DPlot imports the file flawless
Thanks for your help, David!
Cheers,
Posted: Fri Jul 14, 2017 2:37 pm
by Roberto
Hi David,
Can time representation along the x-axis be displayed without seconds?
Thus like 13:00 instead of 13:00:00?
Posted: Fri Jul 14, 2017 5:59 pm
by DPlotAdmin
Yes. Select Options>Number Formats. In the list under Time select whatever built-in format you want, or enter your own in the adjacent text box.
Posted: Sat Jul 15, 2017 10:09 am
by Roberto
Wow! That's an interesting surprise!
I slowly get why the rate of DPlot updates has been slowing down lately ... it's already pretty much all in there
Experience is going to be like Directory Opus file manager: the longer you use it new surprises keep showing up
