Using a date field to create folder name

megatronixs

Registered User.
Local time
Today, 08:38
Joined
Aug 17, 2012
Messages
719
Hi all,

Is there a way to use a field with date in it to create a folder?
the field has a data like this 15/05/2014 in it and the / will not work in folder creation. So I was wondering how to get around it.

Any idea how to use:

Code:
MkDir "c:\Test\Access" & Me.Date_In & "/"

Greetings.
 
Code:
 MkDir "c:\Test\Access" & Replace(Me.Date_In,"/","")
 
use the format function to format the date the way you want

my recommendations (because it will sort in date order)
format(date_in,"yyyymmdd") - 20150227
format(date_in,"yyyy mm dd")- 2015 02 27
format(date_in,"yyyy.mm.dd")- 2015.02.27

or anything else you fancy
format(date_in,"dd.mm.yyyy")- 27.02.2015
format(date_in,"dd.mm.yy")- 27.02.15
format(date_in,"dd mmm yyyy") - 27 Feb 2015
 
Hi,
That worked nice out. I used the one from CJ London as this one I could remember easier.

Big thanks both of you :-)

Greetings.
 

Users who are viewing this thread

Back
Top Bottom