Is it possible to store the entire ModificationDate ( Object ) of Many file
How do you wish to store it?
i dont know
i didn’t know that is possible to store object
Easier array but i will do whatever need to do for other solution
look at the SQLDATE or SQLDATETIME property of the Date object
It is also possible to store the TotalSeconds master property of the date object.
But the most important question is : what do you want to achieve ?
Always the right question Michel
I want to store the mod date off thousand files
Then return the Mod date to the original ( from the stored data )
Do i only need ( SQLDATETIME )
I have tried… store in string array then return to date
It convert to 1904 0:00:00
So i thought that i need to store the whole object
Denis, after reading the whole thread, I am not quite certain what you want to accomplish.
If you want to save the last modification date of a number of objects in an array, you should be able to assign the SQLDate property of the date object for the file to an array element. I suspect that the issue you are encountering is mapping the date property of a folderitem.
In clear, what folderitems return is a datevalue. This datevalue needs to be assigned to a date object, which can return a sqldate string. You can either store the folderitem datevalue directly or the sqldate value in the array, it depends on how you want to manage the data.
Updating the modification date of a folderitem cannot be done directly according to the LR:
[quote]Changing ModificationDate is slightly more complex. You cannot just change the ModificationDate property directly because you will simply be changing a date that is not persistent. Instead you need to create a new date instance with the date you want and then assign that to ModificationDate. Here is an example that “touches” a file by settings its modification date to the current date and time:
Dim f As New FolderItem
f = GetOpenFolderItem("")
If f <> Nil Then
Dim newDate As New Date
f.ModificationDate = newDate
My guess is that you want to manage a SQLDate array in your program, You would then assign the SQLDate to a date object that you would use to update the folderitem modification date property.
hoping that this helps.
I’m able to set Mod date from a folderItem to another folderItem live… But not from a array
It’s more clear now with that explanation
Clear that the problem is between me and my code
I’l return to store SQLDATE in array then try to re-map to folderItem
Now that i know… it’s the proper way
As Louis said, store SQLDateTime, use the SQLDateTime to create a new Date object, use that date object to update the FolderItem.
I see the date and time in one string and same format as osx finder format
What Tim meant is that you can Store the SQLDateTime Property of a FolderItem as a String in an Array:
You Loop starts here
Go Back to the Start of your Loop
Later you do something like:
Dim datOriginalModificationDate As New Date
datOriginalModificationDate.SQLDateTime = theStringArrayWithTheSQLDateTimeString(X)
theFolderItemIWantToChangeTheDateOf.ModificationDate = datOriginalModificationDate
All Code written from my mind = I did not test it…
Thank you all
Louis & Sascha… yep is was my misunderstanding of mapping the string to date ( As new Date )