formatting a number to a date

ahajee

New Member
Joined
Jul 29, 2004
Messages
33
I'm trying to convert a number to a date in access. If i open the table in design view and change the data type from number to date, it doesnt format it correctly. So in my query, whats the formula for formatting a date.

Format([Date],"mm,dd,yyyy") ------doesnt work.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
convert a number to a date in access
What are the numbers like? And how did you end up with numbers instead of date?

Access will usually recognise a number representing a data when importing data.
 
Upvote 0
i extracted some data from a database and i need to format the date in access. I've already changed the data type from number to date. Now i need to format in my query.

ex. 20041101, 20042804
 
Upvote 0
Try this

RealDate:DateSerial(Left([Date], 4), Right([Date], 2), Mid([Date], 5, 2))
 
Upvote 0
I take it you mean that Due Date contains 20041101 etc?

Something like this:

RealDate:DateSerial(Left([Due Date], 4), Right([Due Date], 2), Mid([Due Date], 5, 2))
 
Upvote 0

Forum statistics

Threads
1,221,821
Messages
6,162,157
Members
451,750
Latest member
pnkundalia

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top