Specifying a default for graph cursor default
I would like to use the cursor axis info copy feature to copy date and time with date format YYYYMMDD followed by time format HH:MM:SS.SSS - for example 20260725 05:04:40.562. However, graphs use a date format DD/MM/YYYY. This is not a particular problem. However, the cursor displays the position uses the same format - for example 25/07/2026 05:04:40.562. I have the cursor info Date format set to readable with seconds and fractional seconds digits to three. Tables display the date/time in the desired format 20260725 05:04:40.562 which is my working format.
Any thoughts on how I can change the cursor copy format ?
I have a bit difficulty to follow what you are trying to achieve. The Copy Value menu of the Info bar copies the date value exactly as it is displayed in the format you have set. This date / time format is the same as for your system settings (on Windows), i.e., the short date with the long time. If you want to change this, go to the Windows settings dialog and change the date format. If you want a specific date format without changing any settings you can use the raw time in seconds instead and use Secs2Date() and Secs2Time(). For example to get the date in your format YYYYMMDD, you could use:
July 25, 2026 at 11:08 pm - Permalink
A picture is worth a thousand words ... the screen shot shows a part of a table with date and time displayed in the format I want. The part of a graph shows the date format for axis and for cursor copying. They are both for the same double precision wave of date/time. The graph format, I learn, uses the default Windows format. I do not particularly want to change Windows.
So, in one instance (the table) Igor displays it in the desired format and in another (copy graph cursor) it does not. Just hoping for a format for copy from cursor that was consistent with table display.
July 26, 2026 at 04:13 am - Permalink
OK, I see. I assume you have the table set to a custom format which shows YYYYMMDD without separators, or how did you get the table to display this way? You can set up the graph axis in the same way if you want. But I am not aware of any way to set a custom format for the Info bar, so I am afraid there is no way to achieve exactly what you want (maybe someone else has an idea). However, you could set up a simple script which copies the date/time from the current cursor position any specific format you might desire by using the raw time and then pass Secs2Date() and Secs2Time() through a formatting function. Is this a useful alternative or do you have to use Copy Value?
July 26, 2026 at 05:23 am - Permalink
I have a number of places in my experiments where I need to paste the cursor copy: to search a table; to find a specific date-time on a different database; etc. I do paste it and translate to desired format or edit it, but the I do this so many times I thought there may be a better way. Maybe someone else has some ideas.
July 26, 2026 at 05:45 am - Permalink
Consider using a function. Grab the x position of the cursor. Translate it to the desired format. Output it. Once the function works by manual invocation, give it a Macro menu with a command/option keystroke call and put the procedure as a general utility in Igor Procedures. Subsequently, set the cursor on the graph where you want, switch to activate your blank table cell, and invoke the copy->translate->paste function via its keystroke command.
July 26, 2026 at 12:05 pm - Permalink
Edit - I misunderstood the original request. Here is chozo's suggestion in code form, and a function to find a value in a table:
This was not what was requested :
July 27, 2026 at 04:50 am - Permalink
The format choices in the Info bar were driven by need for compact formatting, and an attempt to avoid making it too complicated to use. It wasn't envisioned to be a general-purpose format, but rather, an aid to understanding the graph.
July 27, 2026 at 09:28 am - Permalink
It would be useful if we could programmatically change the date/time format in the infobar, or even just capture it as a graph preference. Changing the format to Readable with Seconds (with or without the date) is something I do pretty much every time I have a graph with time on the X axis.
July 27, 2026 at 01:15 pm - Permalink
Tony, I will try the edit version tomorrow
July 27, 2026 at 02:11 pm - Permalink
In reply to It would be useful if we… by KZarzana
johnweeksI just tried the info cursors on a graph with a date/time axis. At first, I thought it wasn't even setting the format to date/time, then realized that that is the "compact" format (which is identified in the source code as "unreadable" :).
Yeah, I hear you, and agree that is a pretty much essential upgrade.
July 27, 2026 at 04:25 pm - Permalink
Nice one Tony - That works a treat! Thanks
Thanks to all for responses.
July 28, 2026 at 06:19 am - Permalink