Jörg Buchholz
unread,Mar 9, 2021, 9:15:29 AM3/9/21You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
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