ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Imported data Date Format (https://www.excelbanter.com/excel-discussion-misc-queries/208341-imported-data-date-format.html)

BT[_2_]

Imported data Date Format
 
Hi to all
I have a spreadsheet with data imported from an external source that
contains five date fields. In one of these the dates look OK but the field
has a general format diplayed as a date, and can be used to perform date
arithmetic. However if I try and perform a numeric custom filter the data is
not recognised. I can correct this by performing a Data / Text to Columns and
selecting a date format, but can anybody explain to me how this anomoly can
be?

Thanks.

joel

Imported data Date Format
 
Your custom filter should not use the date "10/30/08" instead use
DataValue("10/30/08"). the dates on the worksheet are store as numberr and
comparing again a string date won't work. You need to use DataValue to
convert the string to a number.

"BT" wrote:

Hi to all
I have a spreadsheet with data imported from an external source that
contains five date fields. In one of these the dates look OK but the field
has a general format diplayed as a date, and can be used to perform date
arithmetic. However if I try and perform a numeric custom filter the data is
not recognised. I can correct this by performing a Data / Text to Columns and
selecting a date format, but can anybody explain to me how this anomoly can
be?

Thanks.


BT[_2_]

Imported data Date Format
 
Thanks Joel!

"Joel" wrote:

Your custom filter should not use the date "10/30/08" instead use
DataValue("10/30/08"). the dates on the worksheet are store as numberr and
comparing again a string date won't work. You need to use DataValue to
convert the string to a number.

"BT" wrote:

Hi to all
I have a spreadsheet with data imported from an external source that
contains five date fields. In one of these the dates look OK but the field
has a general format diplayed as a date, and can be used to perform date
arithmetic. However if I try and perform a numeric custom filter the data is
not recognised. I can correct this by performing a Data / Text to Columns and
selecting a date format, but can anybody explain to me how this anomoly can
be?

Thanks.


Dave Peterson

Imported data Date Format
 
If changing the numberformat of the cells to an unambiguous data format don't
change what you see in the worksheet, then your values aren't really dates.

You may be able to do some stuff to convert to real dates, but I'd be careful.

After converting to real dates, I'd compare the dates in my excel file with the
dates in the original source. You may find that you have dates, but they're not
the dates that they should be.

01/02/03
could be changed to January 2, 2003 in excel
but in the original source, it may represent February 3, 2001



BT wrote:

Hi to all
I have a spreadsheet with data imported from an external source that
contains five date fields. In one of these the dates look OK but the field
has a general format diplayed as a date, and can be used to perform date
arithmetic. However if I try and perform a numeric custom filter the data is
not recognised. I can correct this by performing a Data / Text to Columns and
selecting a date format, but can anybody explain to me how this anomoly can
be?

Thanks.


--

Dave Peterson

BT[_2_]

Imported data Date Format
 
Thanks to you too Dave, and I'll heed the warning!

"Dave Peterson" wrote:

If changing the numberformat of the cells to an unambiguous data format don't
change what you see in the worksheet, then your values aren't really dates.

You may be able to do some stuff to convert to real dates, but I'd be careful.

After converting to real dates, I'd compare the dates in my excel file with the
dates in the original source. You may find that you have dates, but they're not
the dates that they should be.

01/02/03
could be changed to January 2, 2003 in excel
but in the original source, it may represent February 3, 2001



BT wrote:

Hi to all
I have a spreadsheet with data imported from an external source that
contains five date fields. In one of these the dates look OK but the field
has a general format diplayed as a date, and can be used to perform date
arithmetic. However if I try and perform a numeric custom filter the data is
not recognised. I can correct this by performing a Data / Text to Columns and
selecting a date format, but can anybody explain to me how this anomoly can
be?

Thanks.


--

Dave Peterson



All times are GMT +1. The time now is 01:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com