如何使用当前日期作为CSV文件的名称 [英] How to use the current date as name for a CSV file
本文介绍了如何使用当前日期作为CSV文件的名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何创建以日期作为csv文件名称的csv文件.我尝试过这样做,但是日期不会只出现在名字上.语言是Scilab,类似于Matlab.
How do I create a csv file with date as the name of the csv file. I tried doing it, but the date won't appear only the name does. The language is Scilab which is similar to Matlab.
推荐答案
我无法完全理解您的问题.但是请遵循 csvWrite 文档和
I do not understand your question fully. But following the csvWrite documentation and the date documentation. You could do someting like this
filename_with_date_string = date() + ".csv";
directory_path = TMPDIR;
// Some matrix you want to save
M = [1:10] * 0.1;
// Create the file
file = fullfile(directory_path, filename_with_date_string);
// Fill it with your matrix
csvWrite(M, file);
这篇关于如何使用当前日期作为CSV文件的名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文