473,597 Members | 2,157 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to get the date the image was created?

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(strImagePat h) ' 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
4 2833
You need to use the FileDateTime function:

MyDate = FileDateTime(st rImagePath)

<ol**@ylm.sewro te in message
news:11******** ************@19 g2000hsx.google groups.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(strImagePat h) ' 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
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(strImagePat h) ' get the first filename
MyDate = FileDateTime(st rImagePath)
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(st rImagePath)
' would like to get the date that the images was created here.
Loop


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

MyDate = FileDateTime(st rImagePath)

<o...@ylm.sewro te in message

news:11******** ************@19 g2000hsx.google groups.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(strImagePat h) ' 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
ol**@ylm.se wrote in news:1188681521 .257059.95730
@o80g2000hse.go oglegroups.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(strImagePat h) ' get the first filename
MyDate = FileDateTime(st rImagePath)
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(st rImagePath)
' 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:\myimage s\"
strImageExtn = ".jpg"

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

Do While strImageName <"" ' Start loop.
MyDate = FileDateTime(st rImagePath & 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
thanks a lot Bob
now it works perfekt.
/BigOlle

On Sep 2, 12:31 am, Bob Quintal <rquin...@sPAmp atico.cawrote:
o...@ylm.se wrote in news:1188681521 .257059.95730
@o80g2000hse.go oglegroups.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(strImagePat h) ' get the first filename
MyDate = FileDateTime(st rImagePath)
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(st rImagePath)
' 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:\myimage s\"
strImageExtn = ".jpg"

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

Do While strImageName <"" ' Start loop.
MyDate = FileDateTime(st rImagePath & 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.co m- Hide quoted text -

- Show quoted text -

Sep 2 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2544
by: Sylvian Tam | last post by:
Hi all, I am using the File System Object to get a list of image through a specified local path : Dim fso, ffolder, ffile, fc, fproperity, strOut, strPic Set fso = CreateObject("Scripting.FileSystemObject") Set ffolder = fso.GetFolder(folderspec) Set fc = ffolder.Files
2
4154
by: Tjerk | last post by:
Hello all, I have the script below to change an image depending on the date upto january it worked fine but then it just stopped working does anybody have an idea how I can make it work again or why it doesn't work? Thanks in advance Tjerk
8
2605
by: Jef Driesen | last post by:
I'm implementing some image processing algorithms in C++. I created a class called 'image' (see declaration below), that will take care of the memory allocations and some basic (mathematical) stuff. The class will behave like a std::vector (copy constructor and assignment create a deep copy), but with 2D indexing. Now I also need a 'view' class that will behave like a reference to an 'image' (can only be constructed from an existing...
6
4744
by: Yeah | last post by:
I have alternate holiday headers for my web site, and I would like to display a certain image for an upcoming holiday. Examples: Christmas 12/10 - 12/26 New Years Eve 12/27 - 1/2 Halloween 10/15 - 11/1 etc. etc. If the date doesn't fall in any upcoming holiday ranges, then the default image is displayed.
1
15212
by: wdw1970 | last post by:
Hello Everyone! This is my first post to the forum. --------------------------------------------------------------------------------------------- In my database, I have a continuous subform called: "subCallBack". I setup my query, so that it only shows records that do contain a date value, in the "lsrCallBackDate" column. Any record within this subform, is one of our customers that our employee needs to call on a certain date....
9
1440
by: PigInACage | last post by:
Hi all, I'm trying to convert a simple date from: YYYYMMDD (20060613) to DD/MM/YYYY (13/06/2006) I'm reading the date command manual but I think is not ok for this issue.
3
3532
by: janetopps | last post by:
I have a news website, with asp pages, which was on Access, and i upgraded to MySQL, i used Bullzip to transfer the data. It had about 1000 pages, which im now able to pull up on the public side. Im sorting out a few glitches though. Since i upgraded from ms access database to MySQL, i have added about 4 articles to test the new setup. I note some fields aren't being added in the new mySql database for the new 4 records. When i ran the MySQK...
13
32680
by: chromis | last post by:
Hi, I have a query which updates the projects table of my database, however when I try to run my query with blank values i get the following error: Data truncation: Data truncated for column 'date' at row 1 I have done some researching and I believe the problem is to do with the data that is being sent by my cfqueryparam function. Here is my create function:
3
3097
by: neovantage | last post by:
Hey all, i have created image by mixing logo and the original image. It create image and show in the same window. I have done 3 steps for this. First i upload an image to my server by using move_upload_file, then i resize it using class "thumbnail.class.php" My next step was to embed company logo in it(which i already done) and save new embedded logo image to the path where i first upload the original image i mean i want to overwrite...
0
7885
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8271
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8380
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8031
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6686
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5847
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5426
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3881
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3923
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.