How to store 'date' into a string variable?

Dear All,

I’m trying to make a generated wave file which is named by a ‘date’ linux system command in systemverilog or verilog.

for example, in exam.v there is some declared sentence as below.
$fsdbAutoSwitchDumpfile(500, {“./wave_rtl.fsdb”},100);
In here, I’d like to make a file name with date information whenever I run the simulation. How supposed to get the filename with date?

In reply to UVM_LOVE:

try using $system system call…


module abc;
  initial begin
    $display($system("date"));
  end 
endmodule

In reply to yourcheers:

Thanks.

BTW, How to store that into a string type variable?