Command to change axis to Date/Time?

I would like to use a function to create a graph with the bottom axis in Date/Time format. I made this changethrough the dialog and pressed "To Cmd Line" to get the command for this action, but all I got was:

//Axis "bottom" mode changed to date/time mode. Units for wave "SecondsFromIZD" changed to "dat".

In the manual I found ModifyGraph dateFormat and dateInfo, but these seem to control the details of an axis that has already been set to Date/Time format.

What is the command to set the axis' format to date/Time?

Hi,

I think what happens is that the displayed wave scaling is set with the "dat" unit.

SetScale/P x 0,1,"dat", WaveName

Andy

If your graph has an XY wave pair, you need to do as Andy said, but you need to change the "Data" units:

SetScale d 0,0,"dat",yourwavenamehere

 

You are right! I thought I was changing the unit's scaling before plotting the data, but that command line had accidentally dropped out of my code. Changing the wave scaling to dat automatically changes the axis' setting to date/time. Thanks!