cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
Get the free JMP Student Edition for qualified students and instructors at degree granting institutions.

Import a CSV file to Include Date Created and Date Modified

SpannerHead
Level V

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 V

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 V

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