No Date returned with js in asp

A

Andrew Poulos

I'm using JavaScript in ASP to read an MS Access database. I'm querying
a field of a date/time data type. Here's the code that gets the field
value from the record set:

var dVal = rs.fields("UserDate").value;

The field can either have a date or be empty (null). If the field has a
date then there's no problem but if its empty then I'm unable to test
for it. I've tried a variety of tests including:

if (dVal == null)
if (!dVal)
if (typeof dVal == "Date")
if (typeof dVal == "date")
....

Is there a way to test if no date has been returned?

Andrew Poulos
 

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

Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,121
Latest member
LowellMcGu
Top