Odd date and time format
Moderator: DPlotAdmin
Odd date and time format
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
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
Roberto
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
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.
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.
Visualize Your Data
support@dplot.com
support@dplot.com
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.
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.
Roberto
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
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
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
Visualize Your Data
support@dplot.com
support@dplot.com
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).
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).
Roberto
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
I mean that any ofWhat do you mean with some variation?
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:
did not work because the day is 1-based (as is the month). There is no day 0.00-07-17 23:57;DIS;7406;150;0,0;390,3;
Visualize Your Data
support@dplot.com
support@dplot.com
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,
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,
Roberto
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
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.
Visualize Your Data
support@dplot.com
support@dplot.com