Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

A year spent in artificial intelligence is enough to make one believe in God.


computers / comp.graphics.apps.gnuplot / Problems with 12h AM/PM and milliseconds

SubjectAuthor
o Problems with 12h AM/PM and millisecondsJörg_Buchholz

1
Subject: Problems with 12h AM/PM and milliseconds
From: Jörg_Buchholz
Newsgroups: comp.graphics.apps.gnuplot
Organization: A noiseless patient Spider
Date: Tue, 9 Mar 2021 14:15 UTC
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: bookwood...@freenet.de (Jörg_Buchholz)
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>
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
View all headers
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


1
rocksolid light 0.7.2
clearneti2ptor