Date input mask (1 Viewer)

sportsguy

Finance wiz, Access hack
Local time
Yesterday, 22:23
Joined
Dec 28, 2004
Messages
358
I have an excel spreadsheet i want to copy and paste into a pre-formatted table, and the excel date format is integer YYYYMMDD or today is 20140825

I can't get the input mast in MS Access 2007 to create that !

any suggestions?

thanks sportsguy
 

vbaInet

AWF VIP
Local time
Today, 03:23
Joined
Jan 22, 2010
Messages
26,374
Formatting won't convert a Number to a Date type. You need to convert to a date using some String functions before the format will work.
 

Privateer

Registered User.
Local time
Yesterday, 22:23
Joined
Aug 16, 2011
Messages
193
Another question is why do you have dates formatted as integers in Excel? A date in Excel is really an integer behind the scenes and 25 August 2014 is really 41876, so it's not for sorting purposes. You should consider editing Excel and creating a real date field before you import the information. Should you need to display the date like that in Access, use this:
format(date,"yyyymmdd") which will return 20140904. Keep dates as dates, they can be very useful like that, and format them only when you need to display them.
 
Last edited:

Users who are viewing this thread

Top Bottom