By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,164 Members | 1,001 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,164 IT Pros & Developers. It's quick & easy.

how to get the date the image was created?

P: n/a
HI Everyone.
I have tried to get the filedates of images in different maps using
Access2000.
To get the filenames I do like in the vba-code below. That is no
problems.

But how do do I get the actual date of the filename?
Is it possible to get the date that some jpg-images were created?
Hope someone know something about this.

strImagepath = "c:\myimages\*.JPG"

strImageName = Dir(strImagePath) ' Hämta det första katalognamnet.
Do While strImageName <"" ' Start loop.
' do someting, for example put the filenames in a table
strImageName = Dir ' Get next filename'
' would like to get the date that the images was created here.
Loop

/Regards BigOlle

Sep 1 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
You need to use the FileDateTime function:

MyDate = FileDateTime(strImagePath)

<ol**@ylm.sewrote in message
news:11********************@19g2000hsx.googlegroup s.com...
HI Everyone.
I have tried to get the filedates of images in different maps using
Access2000.
To get the filenames I do like in the vba-code below. That is no
problems.

But how do do I get the actual date of the filename?
Is it possible to get the date that some jpg-images were created?
Hope someone know something about this.

strImagepath = "c:\myimages\*.JPG"

strImageName = Dir(strImagePath) ' Hämta det första katalognamnet.
Do While strImageName <"" ' Start loop.
' do someting, for example put the filenames in a table
strImageName = Dir ' Get next filename'
' would like to get the date that the images was created here.
Loop

/Regards BigOlle
Sep 1 '07 #2

P: n/a
hi Stuart.
thanks for you tip.
I am thought a bit confused by the code:
I plan to put strImageName in a table like
strFilename date
123.jpg 07-08-14
234.jpg 07-08-15
124.jpg 07-08-16
237.jpg 07-08-17
Could I accieve this by using the code below?

strImagepath = "c:\myimages\*.JPG"
strImageName = Dir(strImagePath) ' get the first filename
MyDate = FileDateTime(strImagePath)
strImageName = Dir ' Get next filename'
Do While strImageName <"" ' Start loop.
' do someting, for example put the filenames in a table
strImageName = Dir ' Get next filename'
MyDate = FileDateTime(strImagePath)
' would like to get the date that the images was created here.
Loop


On 1 Sep, 15:15, "Stuart McCall" <smcc...@myunrealbox.comwrote:
You need to use the FileDateTime function:

MyDate = FileDateTime(strImagePath)

<o...@ylm.sewrote in message

news:11********************@19g2000hsx.googlegroup s.com...
HI Everyone.
I have tried to get the filedates of images in different maps using
Access2000.
To get the filenames I do like in the vba-code below. That is no
problems.

But how do do I get the actual date of the filename?
hi.
Is it possible to get the date that some jpg-images were created?
Hope someone know something about this.

strImagepath = "c:\myimages\*.JPG"

strImageName = Dir(strImagePath) ' Hämta det första katalognamnet.
Do While strImageName <"" ' Start loop.
' do someting, for example put the filenames in a table
strImageName = Dir ' Get next filename'
' would like to get the date that the images was created here.
Loop

/Regards BigOlle

Sep 1 '07 #3

P: n/a
ol**@ylm.se wrote in news:1188681521.257059.95730
@o80g2000hse.googlegroups.com:
hi Stuart.
thanks for you tip.
I am thought a bit confused by the code:
I plan to put strImageName in a table like
strFilename date
123.jpg 07-08-14
234.jpg 07-08-15
124.jpg 07-08-16
237.jpg 07-08-17
Could I accieve this by using the code below?

strImagepath = "c:\myimages\*.JPG"
strImageName = Dir(strImagePath) ' get the first filename
MyDate = FileDateTime(strImagePath)
strImageName = Dir ' Get next filename'
Do While strImageName <"" ' Start loop.
' do someting, for example put the filenames in a table
strImageName = Dir ' Get next filename'
MyDate = FileDateTime(strImagePath)
' would like to get the date that the images was created
here.
Loop
no. filedatetime needs a fully qualified file name, including the
path.

strImagepath = "c:\myimages\"
strImageExtn = ".jpg"

' get the first filename
strImageName = Dir(strImagePath& "*" & strImageExtn)

Do While strImageName <"" ' Start loop.
MyDate = FileDateTime(strImagePath & strImageName)
' do someting, for example put the filenames in a table

strImageName = Dir ' Get next filename'
Loop
--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Sep 1 '07 #4

P: n/a
thanks a lot Bob
now it works perfekt.
/BigOlle

On Sep 2, 12:31 am, Bob Quintal <rquin...@sPAmpatico.cawrote:
o...@ylm.se wrote in news:1188681521.257059.95730
@o80g2000hse.googlegroups.com:


hi Stuart.
thanks for you tip.
I am thought a bit confused by the code:
I plan to put strImageName in a table like
strFilename date
123.jpg 07-08-14
234.jpg 07-08-15
124.jpg 07-08-16
237.jpg 07-08-17
Could I accieve this by using the code below?
strImagepath = "c:\myimages\*.JPG"
strImageName = Dir(strImagePath) ' get the first filename
MyDate = FileDateTime(strImagePath)
strImageName = Dir ' Get next filename'
Do While strImageName <"" ' Start loop.
' do someting, for example put the filenames in a table
strImageName = Dir ' Get next filename'
MyDate = FileDateTime(strImagePath)
' would like to get the date that the images was created
here.
Loop

no. filedatetime needs a fully qualified file name, including the
path.

strImagepath = "c:\myimages\"
strImageExtn = ".jpg"

' get the first filename
strImageName = Dir(strImagePath& "*" & strImageExtn)

Do While strImageName <"" ' Start loop.
MyDate = FileDateTime(strImagePath & strImageName)
' do someting, for example put the filenames in a table

strImageName = Dir ' Get next filename'
Loop

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account fromhttp://www.teranews.com- Hide quoted text -

- Show quoted text -

Sep 2 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.