#1   Report Post  
LarryTheK
 
Posts: n/a
Default datevalue

When I try to use the function DateValue, I keep getting an error message of
"wrong data type". I've tried many ways of entering the date: '12/31/05,
'12/31/2005, "12/31/2005", but none seem to work.

This was okay last year, but recently I get the error messages. Can someone
help?
  #2   Report Post  
Govind
 
Posts: n/a
Default

Hi,

Try

=DATEVALUE("31-Dec-2005")

It works.

Your first two values were within single quotes and hence they wont
work. On the third format, am not sure of the reason why it doesnt work,
but your date format should be in sync with your default date format set
in the Regional settings.

Regards

Govind.

LarryTheK wrote:

When I try to use the function DateValue, I keep getting an error message of
"wrong data type". I've tried many ways of entering the date: '12/31/05,
'12/31/2005, "12/31/2005", but none seem to work.

This was okay last year, but recently I get the error messages. Can someone
help?

  #3   Report Post  
Biff
 
Posts: n/a
Default

Hi!

The WORKSHEET function DATEVALUE doesn't return that type of error.

Is this in some code?

Either way, you'll need to provide more details.

Biff

"LarryTheK" wrote in message
...
When I try to use the function DateValue, I keep getting an error message
of
"wrong data type". I've tried many ways of entering the date: '12/31/05,
'12/31/2005, "12/31/2005", but none seem to work.

This was okay last year, but recently I get the error messages. Can
someone
help?



  #4   Report Post  
LarryTheK
 
Posts: n/a
Default



"Biff" wrote:

Hi!

The WORKSHEET function DATEVALUE doesn't return that type of error.

Is this in some code?

Either way, you'll need to provide more details.

Biff

"LarryTheK" wrote in message
...
When I try to use the function DateValue, I keep getting an error message
of
"wrong data type". I've tried many ways of entering the date: '12/31/05,
'12/31/2005, "12/31/2005", but none seem to work.

This was okay last year, but recently I get the error messages. Can
someone
help?



Hey Biff,


Well my spreadsheet returns this error! And it isn't CODE that I know of.
I've tried entering all sorts of date formats and I still get the error
message: ....wrong data type.

I've set the column to "date" with mm/dd/yyyy as the format. I've input
dates using a leading apostrophy ('01/01/2005) which displays as a date and
doesn't "calculate" the division a "/" calls for). I've input dates using
straight 7/21/5 and had 07/21/2005 displayed because of the column format.
Also, used an input of
"07/21/2005". Even with the quotes, it doesn't work.

All of these give me a #Value! response in the cell and an explanation of
"...wrong data type."

I use this function in a calculation, but no more. Can't get the difference
between two dates to do an interest calc.

LarrryTheK
  #5   Report Post  
LarryTheK
 
Posts: n/a
Default



"Govind" wrote:

Hi,

Try

=DATEVALUE("31-Dec-2005")

It works.

Your first two values were within single quotes and hence they wont
work. On the third format, am not sure of the reason why it doesnt work,
but your date format should be in sync with your default date format set
in the Regional settings.

Regards

Govind.

LarryTheK wrote:

When I try to use the function DateValue, I keep getting an error message of
"wrong data type". I've tried many ways of entering the date: '12/31/05,
'12/31/2005, "12/31/2005", but none seem to work.

This was okay last year, but recently I get the error messages. Can someone
help?



Sorry, it didn't help. Double quotes still give give the same error
message: Wrong data type.

I think the function is wrong.

Bottom line, I can't compute date differences to use in a formula.

LarryTheK


  #6   Report Post  
Piranha
 
Posts: n/a
Default


LarryTheK,

If i copy and paste the =DATEVALUE("31-Dec-2005") as Govind
provided it works fine. it shows the date as a serial.

If you Format a cell like you said (mm/dd/yyyy) (say A1). then if you
enter the date with a
leading ' you are takeing away the date format and entering the date as
text.

If you do this and your text/date is in A1 and you put in B1
=DATEVALUE(A1)
then you will also get the serial.

If you do the above and A1 is without the leading ' you will get the
#VALUE! error.

Do you have any data validation causing the (wrong data type) message?

It sound like you are using this data in some kind of caluction, which
may also
have some bearing.

Dave

LarryTheK Wrote:
"Biff" wrote:

Hi!

The WORKSHEET function DATEVALUE doesn't return that type of error.

Is this in some code?

Either way, you'll need to provide more details.

Biff

"LarryTheK" wrote in message
...
When I try to use the function DateValue, I keep getting an error

message
of
"wrong data type". I've tried many ways of entering the date:

'12/31/05,
'12/31/2005, "12/31/2005", but none seem to work.

This was okay last year, but recently I get the error messages.

Can
someone
help?



Hey Biff,


Well my spreadsheet returns this error! And it isn't CODE that I know
of.
I've tried entering all sorts of date formats and I still get the
error
message: ....wrong data type.

I've set the column to "date" with mm/dd/yyyy as the format. I've
input
dates using a leading apostrophy ('01/01/2005) which displays as a date
and
doesn't "calculate" the division a "/" calls for). I've input dates
using
straight 7/21/5 and had 07/21/2005 displayed because of the column
format.
Also, used an input of
"07/21/2005". Even with the quotes, it doesn't work.

All of these give me a #Value! response in the cell and an explanation
of
"...wrong data type."

I use this function in a calculation, but no more. Can't get the
difference
between two dates to do an interest calc.

LarrryTheK

Govind
Guest Posts: n/a

datevalue

--------------------------------------------------------------------------------

Hi,

Try

=DATEVALUE("31-Dec-2005")

It works.


--
Piranha
------------------------------------------------------------------------
Piranha's Profile: http://www.excelforum.com/member.php...o&userid=20435
View this thread: http://www.excelforum.com/showthread...hreadid=387908

  #7   Report Post  
LarryTheK
 
Posts: n/a
Default



"Piranha" wrote:


LarryTheK,

If i copy and paste the =DATEVALUE("31-Dec-2005") as Govind
provided it works fine. it shows the date as a serial.

If you Format a cell like you said (mm/dd/yyyy) (say A1). then if you
enter the date with a
leading ' you are takeing away the date format and entering the date as
text.

If you do this and your text/date is in A1 and you put in B1
=DATEVALUE(A1)
then you will also get the serial.

If you do the above and A1 is without the leading ' you will get the
#VALUE! error.

Do you have any data validation causing the (wrong data type) message?

It sound like you are using this data in some kind of caluction, which
may also
have some bearing.

Dave

LarryTheK Wrote:
"Biff" wrote:

Hi!

The WORKSHEET function DATEVALUE doesn't return that type of error.

Is this in some code?

Either way, you'll need to provide more details.

Biff

"LarryTheK" wrote in message
...
When I try to use the function DateValue, I keep getting an error

message
of
"wrong data type". I've tried many ways of entering the date:

'12/31/05,
'12/31/2005, "12/31/2005", but none seem to work.

This was okay last year, but recently I get the error messages.

Can
someone
help?


Hey Biff,


Well my spreadsheet returns this error! And it isn't CODE that I know
of.
I've tried entering all sorts of date formats and I still get the
error
message: ....wrong data type.

I've set the column to "date" with mm/dd/yyyy as the format. I've
input
dates using a leading apostrophy ('01/01/2005) which displays as a date
and
doesn't "calculate" the division a "/" calls for). I've input dates
using
straight 7/21/5 and had 07/21/2005 displayed because of the column
format.
Also, used an input of
"07/21/2005". Even with the quotes, it doesn't work.

All of these give me a #Value! response in the cell and an explanation
of
"...wrong data type."

I use this function in a calculation, but no more. Can't get the
difference
between two dates to do an interest calc.

LarrryTheK

Govind
Guest Posts: n/a

datevalue

--------------------------------------------------------------------------------

Hi,

Try

=DATEVALUE("31-Dec-2005")

It works.


--
Piranha
------------------------------------------------------------------------
Piranha's Profile: http://www.excelforum.com/member.php...o&userid=20435
View this thread: http://www.excelforum.com/showthread...hreadid=387908





04/04/2005
05/05/2005
#VALUE!

This is what I have. Dates are entered with a date format for this display.
The third cell uses the datevalue function to subtract the second from the
first. It is used in an interest calculating spreadsheet.

Why do I get the error? Do I have a corrupt excel program?

LarryTheK
  #8   Report Post  
LarryTheK
 
Posts: n/a
Default



"Piranha" wrote:


LarryTheK,

If i copy and paste the =DATEVALUE("31-Dec-2005") as Govind
provided it works fine. it shows the date as a serial.

If you Format a cell like you said (mm/dd/yyyy) (say A1). then if you
enter the date with a
leading ' you are takeing away the date format and entering the date as
text.

If you do this and your text/date is in A1 and you put in B1
=DATEVALUE(A1)
then you will also get the serial.

If you do the above and A1 is without the leading ' you will get the
#VALUE! error.

Do you have any data validation causing the (wrong data type) message?

It sound like you are using this data in some kind of caluction, which
may also
have some bearing.

Dave

LarryTheK Wrote:
"Biff" wrote:

Hi!

The WORKSHEET function DATEVALUE doesn't return that type of error.

Is this in some code?

Either way, you'll need to provide more details.

Biff

"LarryTheK" wrote in message
...
When I try to use the function DateValue, I keep getting an error

message
of
"wrong data type". I've tried many ways of entering the date:

'12/31/05,
'12/31/2005, "12/31/2005", but none seem to work.

This was okay last year, but recently I get the error messages.

Can
someone
help?


Hey Biff,


Well my spreadsheet returns this error! And it isn't CODE that I know
of.
I've tried entering all sorts of date formats and I still get the
error
message: ....wrong data type.

I've set the column to "date" with mm/dd/yyyy as the format. I've
input
dates using a leading apostrophy ('01/01/2005) which displays as a date
and
doesn't "calculate" the division a "/" calls for). I've input dates
using
straight 7/21/5 and had 07/21/2005 displayed because of the column
format.
Also, used an input of
"07/21/2005". Even with the quotes, it doesn't work.

All of these give me a #Value! response in the cell and an explanation
of
"...wrong data type."

I use this function in a calculation, but no more. Can't get the
difference
between two dates to do an interest calc.

LarrryTheK

Govind
Guest Posts: n/a

datevalue

--------------------------------------------------------------------------------

Hi,

Try

=DATEVALUE("31-Dec-2005")

It works.


--
Piranha
------------------------------------------------------------------------
Piranha's Profile: http://www.excelforum.com/member.php...o&userid=20435
View this thread: http://www.excelforum.com/showthread...hreadid=387908

A further question: why do I get > when I seem to use " ???

  #9   Report Post  
Piranha
 
Posts: n/a
Default


LarryTheK Wrote:
"Piranha" wrote:


LarryTheK,

If i copy and paste the =DATEVALUE("31-Dec-2005") as Govind
provided it works fine. it shows the date as a serial.

If you Format a cell like you said (mm/dd/yyyy) (say A1). then if

you
enter the date with a
leading ' you are takeing away the date format and entering the date

as
text.

If you do this and your text/date is in A1 and you put in B1
=DATEVALUE(A1)
then you will also get the serial.

If you do the above and A1 is without the leading ' you will get

the
#VALUE! error.

Do you have any data validation causing the (wrong data type)

message?

It sound like you are using this data in some kind of caluction,

which
may also
have some bearing.

Dave

LarryTheK Wrote:
"Biff" wrote:

Hi!

The WORKSHEET function DATEVALUE doesn't return that type of

error.

Is this in some code?

Either way, you'll need to provide more details.

Biff

"LarryTheK" wrote in

message
...
When I try to use the function DateValue, I keep getting an

error
message
of
"wrong data type". I've tried many ways of entering the date:
'12/31/05,
'12/31/2005, "12/31/2005", but none seem to work.

This was okay last year, but recently I get the error

messages.
Can
someone
help?


Hey Biff,

Well my spreadsheet returns this error! And it isn't CODE that I

know
of.
I've tried entering all sorts of date formats and I still get the
error
message: ....wrong data type.

I've set the column to "date" with mm/dd/yyyy as the format. I've
input
dates using a leading apostrophy ('01/01/2005) which displays as a

date
and
doesn't "calculate" the division a "/" calls for). I've input

dates
using
straight 7/21/5 and had 07/21/2005 displayed because of the column
format.
Also, used an input of
"07/21/2005". Even with the quotes, it doesn't work.

All of these give me a #Value! response in the cell and an

explanation
of
"...wrong data type."

I use this function in a calculation, but no more. Can't get the
difference
between two dates to do an interest calc.

LarrryTheK

Govind
Guest Posts: n/a

datevalue


--------------------------------------------------------------------------------

Hi,

Try

=DATEVALUE("31-Dec-2005")

It works.


--
Piranha

------------------------------------------------------------------------
Piranha's Profile:

http://www.excelforum.com/member.php...o&userid=20435
View this thread:

http://www.excelforum.com/showthread...hreadid=387908





04/04/2005
05/05/2005
#VALUE!

This is what I have. Dates are entered with a date format for this
display.
The third cell uses the datevalue function to subtract the second from
the
first. It is used in an interest calculating spreadsheet.

Why do I get the error? Do I have a corrupt excel program?

LarryTheK

LarrryTheK,
You can't use the DateValue function with a date formated cell. It has
to be text.
The objective of the DateValue function is to convert a date as text
into a serial.

IE
A1 & A2 formated as text (leading')
B1 & B2 formated as general
A1.......................B1
4/4/2005............38446
5/5/2005............38477
...........................31
So A1 Formated as text (leading ')with the date '4/4/2005
B1 formated as general with =DATEVALUE(A1) will give serial 38446

So A2 Formated as text (leading ')with the date '5/5/2005
B2 formated as general with =DATEVALUE(A2) will give serial 38477

B3 is formated as general with the formula =B2-B1
Gives the result of 31 days

This help?
Dave


--
Piranha
------------------------------------------------------------------------
Piranha's Profile: http://www.excelforum.com/member.php...o&userid=20435
View this thread: http://www.excelforum.com/showthread...hreadid=387908

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
DateValue & Vlookup? BEEZ Excel Discussion (Misc queries) 3 June 28th 05 01:20 PM
Conditional Sum and DATEVALUE function Vlad Excel Worksheet Functions 2 June 14th 05 05:00 PM
Bug in DATEVALUE command in Excel 2002?? MattB-UK Excel Worksheet Functions 1 February 16th 05 01:03 PM
Datevalue if born before 1930 Frank Malone Excel Worksheet Functions 6 January 13th 05 02:46 AM
datevalue RUanExcelnut Excel Worksheet Functions 2 January 12th 05 08:26 PM


All times are GMT +1. The time now is 05:20 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"