Skip to main content
Inspiring
January 18, 2008
Question

Update form & date time field

  • January 18, 2008
  • 2 replies
  • 249 views
Platform: ASP classic
DB: MSSQL

I have a datetime field on an update form that is giving me fits. When
I do not enter a value it throw an error about wrong data type. When I
put this code in

if (isnull(CStr(Request.Form("Left_Date")))) then

that processes the update without the datetime field. The else part of
the statement processes with the datetime field. The if does not work.

Any idea how this situation should be handled?

--

This topic has been closed for replies.

2 replies

Inspiring
January 22, 2008
jsteinmann wrote:

> does that column allow nulls?

This morning I did a little more digging and ended up with isdate.
That solved the problem. I also had another problem, it was a kin to
hitting yourself in the head with a hammer, your head won't hurt if you
quite swinging the hammer.

But to answer your question, yes it did allow nulls.

Thanks for the response.

--

January 21, 2008
does that column allow nulls?