cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Register to attend Discovery Summit 2025 Online: Early Users Edition, Sept. 24-25.
  • New JMP features coming to desktops everywhere this September. Sign up to learn more at jmp.com/launch.
Choose Language Hide Translation Bar
SpannerHead
Level VI

Import a CSV file to Include Date Created and Date Modified

I need to import a series of CSV files that do not explicitly contain a date stamp as data text.  Am I able to somehow collect the date modified and / or date created to fill in the blanks?


Slán



SpannerHead
2 ACCEPTED SOLUTIONS

Accepted Solutions
jthi
Super User

Re: Import a CSV file to Include Date Created and Date Modified

With Multiple File Import you can add file creation date

jthi_0-1742586400372.png

And if you are opening those using JSL you can use Last Modification Date

jthi_1-1742586428991.png

and/or Creation Date to add new column after you load the .csv as a table

jthi_2-1742586450374.png

both are found under File in Script Index and JSL Syntax Reference

-Jarmo

View solution in original post

SpannerHead
Level VI

Re: Import a CSV file to Include Date Created and Date Modified

I got this to work with this included in an iteration.

 

Current_File = path || final_files[i],

Creation_Date = Format( Creation Date(Current_file), "ddmonyyyy:h:m:s"); Modification_Date = Format( Last Modification Date(Current_file), "ddmonyyyy:h:m:s"); dt << New Column("Creation Date", Character, "Nominal", Formula(Eval(Creation_Date))); dt << New Column("Modification Date", Character, "Nominal", Formula(Eval(Modification_Date)));

Slán



SpannerHead

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Import a CSV file to Include Date Created and Date Modified

With Multiple File Import you can add file creation date

jthi_0-1742586400372.png

And if you are opening those using JSL you can use Last Modification Date

jthi_1-1742586428991.png

and/or Creation Date to add new column after you load the .csv as a table

jthi_2-1742586450374.png

both are found under File in Script Index and JSL Syntax Reference

-Jarmo
SpannerHead
Level VI

Re: Import a CSV file to Include Date Created and Date Modified

I got this to work with this included in an iteration.

 

Current_File = path || final_files[i],

Creation_Date = Format( Creation Date(Current_file), "ddmonyyyy:h:m:s"); Modification_Date = Format( Last Modification Date(Current_file), "ddmonyyyy:h:m:s"); dt << New Column("Creation Date", Character, "Nominal", Formula(Eval(Creation_Date))); dt << New Column("Modification Date", Character, "Nominal", Formula(Eval(Modification_Date)));

Slán



SpannerHead

Recommended Articles