Converting Dates

L

LAF

I have a table in MS Access which stores a date in the Date/Time format
dd-mmm-yyyy. In my Excel spreadsheet, I have a variable which I pul
this date into. In the spreadsheet, it pulls it in the same forma
dd-mmm-yyyy. Is there a way to convert that date into a numeri
number? I want to leave the database as dd-mmm-yyyy, but have m
variable in the spreadsheet store it as numeric
 
F

Frank Kabel

Hi
try
- copy an empty cell
- select your imported data
- use 'Edit - Paste Special' and choose 'Add'

another option: try using 'Data - Text to columns'
 
J

Jamie Collins

LAF said:
I have a table in MS Access which stores a date in the Date/Time format,
dd-mmm-yyyy.
Is there a way to convert that date into a numeric

Change your query e.g. if it currently looks like this:

SELECT MyDateTimeCol FROM MyTable;

then change it to something a bit more like this:

SELECT
IIF(MyDateTimeCol IS NULL, 0, CDBL(MyDateTimeCol))
AS MyDateTimeNum FROM Sheet1;

Jamie.

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top