How to write time stamp to a specific cell in csv file

3 vues (au cours des 30 derniers jours)
NAFTALI HERSCOVICI
NAFTALI HERSCOVICI le 4 Jan 2022
Commenté : Cris LaPierre le 4 Jan 2022
I have a csv file that I read and write to it. I need to "stamp" the date and time last accessed.
Couldn't find a simple example.
Assuming I defined,
dt=datestr(now,'mmmm dd,yyyy HH:MM:SS AM'),
I wouldlike to store dt into the csv file on cell F1
Thanks

Réponse acceptée

Cris LaPierre
Cris LaPierre le 4 Jan 2022
I believe that is not an option with a csv file. They are text files, so don't have cells or ranges. It may be possible with a spreadsheet. See this example of writing to a specific range of a spreadsheet.
  2 commentaires
NAFTALI HERSCOVICI
NAFTALI HERSCOVICI le 4 Jan 2022
wouldn't dt be a string?
Cris LaPierre
Cris LaPierre le 4 Jan 2022
Technically a character array.

Connectez-vous pour commenter.

Plus de réponses (0)

Produits


Version

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by