Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #4394

Problems with 12h AM/PM and milliseconds

Path csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From Jörg Buchholz <bookwood4new@freenet.de>
Newsgroups comp.graphics.apps.gnuplot
Subject Problems with 12h AM/PM and milliseconds
Date Tue, 9 Mar 2021 15:15:27 +0100
Organization A noiseless patient Spider
Lines 62
Message-ID <s27vtv$j95$1@dont-email.me> (permalink)
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
Injection-Date Tue, 9 Mar 2021 14:15:27 -0000 (UTC)
Injection-Info reader02.eternal-september.org; posting-host="b116567736c470d7113bb670bce94aeb"; logging-data="19749"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+8U33yLL4v9KWU4Hn9fqlYrjUpiSLiCCQ="
User-Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1
Cancel-Lock sha1:mb4r8pzPrT3gBOzSMjz3vGDXYEw=
Content-Language en-GB
X-Mozilla-News-Host news://news.eternal-september.org:119
Xref csiph.com comp.graphics.apps.gnuplot:4394

Show key headers only | View raw


Hello,

I have some Problems to read in Time/Date with 12h AM/PM and milliseconds.

These two examples works:

reset
$Data <<EOD
11:59:24 AM  1.23
11:59:59 AM  2.34
12:00:00 PM  3.45
01:01:24 PM  4.56
01:01:24 PM  5.67
EOD
set grid
myInputTimeFmt = "%H:%M:%S %p"
myOutputTimeFmt = "%H:%M\n%S"
set format x myOutputTimeFmt timedate

plot $Data u (timecolumn(1,myInputTimeFmt)):3 w lp pt 7 notitle



reset
$Data <<EOD
11:59:24.654    1.23
11:59:59.000    2.34
12:00:00.999    3.45
13:01:24.000    4.56
13:01:24.555    5.67
EOD
set grid
myInputTimeFmt = "%H:%M:%S"
myOutputTimeFmt = "%H:%M\n%S"
set format x myOutputTimeFmt timedate

plot $Data u (timecolumn(1,myInputTimeFmt)):2 w lp pt 7 notitle



This one not work correctly:

reset
$Data <<EOD
11:59:24.654 AM  1.23
11:59:59.000 AM  2.34
12:00:00.999 PM  3.45
01:01:24.000 PM  4.56
01:01:24.555 PM  5.67
EOD
set grid
myInputTimeFmt = "%H:%M:%S %p"
myOutputTimeFmt = "%H:%M\n%S"
set format x myOutputTimeFmt timedate

plot $Data u (timecolumn(1,myInputTimeFmt)):3 w lp pt 7 notitle



What is wrong?

Jörg

Back to comp.graphics.apps.gnuplot | Previous | Next | Find similar


Thread

Problems with 12h AM/PM and milliseconds Jörg Buchholz <bookwood4new@freenet.de> - 2021-03-09 15:15 +0100

csiph-web