|
Day values greater than one month |
Posted by Anthony Nixon on Oct-18-2011 06:26 |
|
We are displaying simulation data which produces timestamped data with durations upto 50 or 60 days. We'd like to have axis labels like "51 12:00:00" (ie day 51, at midday).
Using "dd hh:mm:ss" as the label will only go up to 31 days (which makes sense since it is expecting it to be the day of a month).
Is there anyway of displaying "day of year" maybe? I know I could go to manually generated labels, but that is a bit of a pain. Would having an extra field that represents the day, and then displaying that field in the label be possible?
Thanks
Anthony Nixon |
Re: Day values greater than one month |
Posted by Peter Kwan on Oct-19-2011 01:19 |
|
Hi Anthony,
May be you can try:
"{=({value}-{value}%86400)/86400} {value|hh:nn:ss}"
In ChartDirector, the date/time is represented as clock seconds elapsed since Jan 1, 0001 00:00:00. As 1 day has 86400 seconds, so the value/86400 is the number of elapsed days, but it may not be a whole number. We need to subtract the value%86400 (the remainder of value divided by 86400) first to get a whole number. This then becomes the formula above.
Hope this can help.
Regards
Peter Kwan |
Re: Day values greater than one month |
Posted by Anthony Nixon on Oct-19-2011 06:59 |
|
Thanks Peter.
That's perfect!
Cheers
Anthony |
|