DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Odd date and time format

 
Post new topic   Reply to topic    DPlot Forum Index -> Suggestions/Questions
View previous topic :: View next topic  
Author Message
Roberto



Joined: 16 Mar 2008
Posts: 102
Location: Netherlands Beek en Donk

PostPosted: Mon Jul 10, 2017 2:27 pm    Post subject: Odd date and time format Reply with quote

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
_________________
Roberto
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2304
Location: Vicksburg, Mississippi

PostPosted: Mon Jul 10, 2017 3:05 pm    Post subject: Reply with quote

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.
_________________
David Hyde
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Roberto



Joined: 16 Mar 2008
Posts: 102
Location: Netherlands Beek en Donk

PostPosted: Tue Jul 11, 2017 12:30 pm    Post subject: Reply with quote

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.
_________________
Roberto
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2304
Location: Vicksburg, Mississippi

PostPosted: Wed Jul 12, 2017 11:48 am    Post subject: Reply with quote

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
_________________
David Hyde
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Roberto



Joined: 16 Mar 2008
Posts: 102
Location: Netherlands Beek en Donk

PostPosted: Wed Jul 12, 2017 2:22 pm    Post subject: Reply with quote

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).
_________________
Roberto
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2304
Location: Vicksburg, Mississippi

PostPosted: Thu Jul 13, 2017 9:01 am    Post subject: Reply with quote

Quote:
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:
Quote:
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.
_________________
David Hyde
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Roberto



Joined: 16 Mar 2008
Posts: 102
Location: Netherlands Beek en Donk

PostPosted: Thu Jul 13, 2017 3:12 pm    Post subject: Reply with quote

Hi David,

Ouch! Silly me having overlooked that Smile
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 Razz

Thanks for your help, David!

Cheers,
_________________
Roberto
Back to top
View user's profile Send private message
Roberto



Joined: 16 Mar 2008
Posts: 102
Location: Netherlands Beek en Donk

PostPosted: Fri Jul 14, 2017 2:37 pm    Post subject: Reply with quote

Hi David,

Can time representation along the x-axis be displayed without seconds?
Thus like 13:00 instead of 13:00:00?
_________________
Roberto
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2304
Location: Vicksburg, Mississippi

PostPosted: Fri Jul 14, 2017 5:59 pm    Post subject: Reply with quote

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.
_________________
David Hyde
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Roberto



Joined: 16 Mar 2008
Posts: 102
Location: Netherlands Beek en Donk

PostPosted: Sat Jul 15, 2017 10:09 am    Post subject: Reply with quote

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 Razz

Experience is going to be like Directory Opus file manager: the longer you use it new surprises keep showing up Smile
_________________
Roberto
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> Suggestions/Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group