Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Another Date problem

I'm importing spreadsheet into Access using a routine
that process the data a line at a time so I can validate
each record. I've got one field that is a date field.
These spreadsheets come from many sources and are
inconsistent. When I look at two spreadsheets from
different sources the dates look the same and have the
same format 'yyyymmdd'. However, when I put the data into
an access table sometimes it goes in correctly and
sometimes it goes in with day and month reversed. Could
this be because the system these spreadsheets were
created on have different region settings and how can I
tell.

Any clues to this would be appreciated.
Paul
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Another Date problem

Look at the dateserial number stored in the cell to get the date.

Use the Value2 property of the range.
--
Regards,
Tom Ogilvy

Paul wrote in message
...
I'm importing spreadsheet into Access using a routine
that process the data a line at a time so I can validate
each record. I've got one field that is a date field.
These spreadsheets come from many sources and are
inconsistent. When I look at two spreadsheets from
different sources the dates look the same and have the
same format 'yyyymmdd'. However, when I put the data into
an access table sometimes it goes in correctly and
sometimes it goes in with day and month reversed. Could
this be because the system these spreadsheets were
created on have different region settings and how can I
tell.

Any clues to this would be appreciated.
Paul



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Another Date problem

Tom,

I've looked at value2 and the number is correct for the
date that's in there. I've tried to put value2 in the
acces table and it still reverses the month and day. I'm
completely bewildered by this.

Paul
-----Original Message-----
Look at the dateserial number stored in the cell to get

the date.

Use the Value2 property of the range.
--
Regards,
Tom Ogilvy

Paul wrote in message
...
I'm importing spreadsheet into Access using a routine
that process the data a line at a time so I can

validate
each record. I've got one field that is a date field.
These spreadsheets come from many sources and are
inconsistent. When I look at two spreadsheets from
different sources the dates look the same and have the
same format 'yyyymmdd'. However, when I put the data

into
an access table sometimes it goes in correctly and
sometimes it goes in with day and month reversed. Could
this be because the system these spreadsheets were
created on have different region settings and how can I
tell.

Any clues to this would be appreciated.
Paul



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Another Date problem

I don't know how access treats or stores dates, but you can convert the
serial to a date string in any format you want; so try using something that
can't be misinterpreted

format(cell.Value2,"mmm dd, yyyy")

--
Regards,
Tom Ogilvy




Paul wrote in message
...
Tom,

I've looked at value2 and the number is correct for the
date that's in there. I've tried to put value2 in the
acces table and it still reverses the month and day. I'm
completely bewildered by this.

Paul
-----Original Message-----
Look at the dateserial number stored in the cell to get

the date.

Use the Value2 property of the range.
--
Regards,
Tom Ogilvy

Paul wrote in message
...
I'm importing spreadsheet into Access using a routine
that process the data a line at a time so I can

validate
each record. I've got one field that is a date field.
These spreadsheets come from many sources and are
inconsistent. When I look at two spreadsheets from
different sources the dates look the same and have the
same format 'yyyymmdd'. However, when I put the data

into
an access table sometimes it goes in correctly and
sometimes it goes in with day and month reversed. Could
this be because the system these spreadsheets were
created on have different region settings and how can I
tell.

Any clues to this would be appreciated.
Paul



.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Another Date problem

Tom,

I've tried that. This is bizarre becasue from one
spreadsheet it works and from another it doesn't. I've
not got much hair as it is but I'm losing it all on this
one.

Paul
-----Original Message-----
I don't know how access treats or stores dates, but you

can convert the
serial to a date string in any format you want; so try

using something that
can't be misinterpreted

format(cell.Value2,"mmm dd, yyyy")

--
Regards,
Tom Ogilvy




Paul wrote in message
...
Tom,

I've looked at value2 and the number is correct for the
date that's in there. I've tried to put value2 in the
acces table and it still reverses the month and day.

I'm
completely bewildered by this.

Paul
-----Original Message-----
Look at the dateserial number stored in the cell to

get
the date.

Use the Value2 property of the range.
--
Regards,
Tom Ogilvy

Paul wrote in message
...
I'm importing spreadsheet into Access using a

routine
that process the data a line at a time so I can

validate
each record. I've got one field that is a date

field.
These spreadsheets come from many sources and are
inconsistent. When I look at two spreadsheets from
different sources the dates look the same and have

the
same format 'yyyymmdd'. However, when I put the data

into
an access table sometimes it goes in correctly and
sometimes it goes in with day and month reversed.

Could
this be because the system these spreadsheets were
created on have different region settings and how

can I
tell.

Any clues to this would be appreciated.
Paul


.



.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
date problem puiuluipui Excel Discussion (Misc queries) 6 March 16th 10 11:15 AM
Date Problem Nick C Excel Discussion (Misc queries) 4 March 4th 09 04:15 PM
Exel increment date problem wrt todays date. [email protected] Excel Worksheet Functions 1 November 11th 07 06:58 PM
Date problem Tredown Excel Worksheet Functions 1 June 6th 07 03:37 PM
Date Formula Problem - Leave date blank if Null Gayla Excel Worksheet Functions 5 April 24th 07 09:42 PM


All times are GMT +1. The time now is 02:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"