Closed sdenef-adeo closed 2 years ago
Hi @sdenef-adeo ,
So it's valid CSV that is being output but I know from direct personal experience that that is hard to deal with in bash, lol. With any of the other commands you would have been able to skip the date formatting by specifying the column manually with -k
, but apparently i had not put that flag in the schedule:render
command. I just published v0.0.83 which adds that flag to the command, so for example:
default date output:
% pd schedule:render -i PXV1QP4 --since '7 days ago' --until 'now' --output=csv
Getting schedule PXV1QP4... done
Start,End,Duration,User id,User name
"1/12/2022, 1:59:02 PM","1/12/2022, 5:00:00 PM","3 hours","PSD4GQ9","Inara Serra"
"1/12/2022, 5:00:00 PM","1/13/2022, 1:00:00 AM","8 hours","PP2XEKB","River Tam"
"1/13/2022, 1:00:00 AM","1/13/2022, 9:00:00 AM","8 hours","P2VEST2","Zoe Washburne"
specifying -k start and -k end to avoid formatting
% pd schedule:render -i PXV1QP4 --since '7 days ago' --until 'now' -k start -k end --output=csv
Getting schedule PXV1QP4... done
start,end,Duration,User id,User name
2022-01-12T13:58:55-05:00,2022-01-12T17:00:00-05:00,3 hours,PSD4GQ9,Inara Serra
2022-01-12T17:00:00-05:00,2022-01-13T01:00:00-05:00,8 hours,PP2XEKB,River Tam
2022-01-13T01:00:00-05:00,2022-01-13T09:00:00-05:00,8 hours,P2VEST2,Zoe Washburne
If this looks ok to you, can you update to v0.0.83 and let me know if it resolves your issue?
Thanks! Martin
Hi Martin,
Yes, it works well. Thanks.
I close the issue.
Hello,
I tried to update all schedule spans over a timeslot. I used the
schedule:render
command to get the spans.Example:
But as dates contain the comma character, it was a little bit hard to extract start/end values via the command line.
After removing the toLocaleString() call in schedule:render I was able to do this.
Maybe there is a better way to extract the value in bash. But I suppose you can also provide an option to avoid date formatting.
What do you think?
Regards, Sébastien