Hi,
I have a field in a table called 'ShipDate'.
This particular field has allow null set to no. So by default this
sets all the records to show 00/00/0000 in the field for each record
that has no data entered.
In my .asp pages I am trying to test against this empty field.
i.e.
If RS("ShipDate") = 0000-00-00
or
If RS("ShipDate") = 00/00/0000
The only thing that seems to work is if I am testing for records with
a date in that field,
If RS("ShipDate") > 0000-00-00
How can I test if that field is empty ?, nothing seems to work ?
Thanks
David 6 10038
Try testing against a string value instead of a numeric one...
If RS("ShipDate") = '0000-00-00' http://www.mysql.com/doc/en/Using_DATE.html
David wrote: Hi,
I have a field in a table called 'ShipDate'. This particular field has allow null set to no. So by default this sets all the records to show 00/00/0000 in the field for each record that has no data entered.
In my .asp pages I am trying to test against this empty field.
i.e.
If RS("ShipDate") = 0000-00-00 or If RS("ShipDate") = 00/00/0000
The only thing that seems to work is if I am testing for records with a date in that field,
If RS("ShipDate") > 0000-00-00
How can I test if that field is empty ?, nothing seems to work ?
Thanks
David
Try testing against a string value instead of a numeric one...
If RS("ShipDate") = '0000-00-00' http://www.mysql.com/doc/en/Using_DATE.html
David wrote: Hi,
I have a field in a table called 'ShipDate'. This particular field has allow null set to no. So by default this sets all the records to show 00/00/0000 in the field for each record that has no data entered.
In my .asp pages I am trying to test against this empty field.
i.e.
If RS("ShipDate") = 0000-00-00 or If RS("ShipDate") = 00/00/0000
The only thing that seems to work is if I am testing for records with a date in that field,
If RS("ShipDate") > 0000-00-00
How can I test if that field is empty ?, nothing seems to work ?
Thanks
David
In article <c1**************************@posting.google.com >, da***@scene-double.co.uk says... I have a field in a table called 'ShipDate'. This particular field has allow null set to no. So by default this sets all the records to show 00/00/0000 in the field for each record that has no data entered.
Just a personal preference... but for a field that has an unknown value,
I prefer to use NULL in the field.
If IsNull(RS("ShipDate")) Then
In article <c1**************************@posting.google.com >, da***@scene-double.co.uk says... I have a field in a table called 'ShipDate'. This particular field has allow null set to no. So by default this sets all the records to show 00/00/0000 in the field for each record that has no data entered.
Just a personal preference... but for a field that has an unknown value,
I prefer to use NULL in the field.
If IsNull(RS("ShipDate")) Then
you did not mention the column/field type for ShipDate
if character type ->
IF RS("ShipDate") = "00/00/0000"
if date type [not datetime]
IF RS("ShipDate") = {00/00/0000}
see if that works for you - your examples below were kinda weird to me.
hth - mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
FREE LONG DISTANCE -> mailto:ex********@efgroup.net
Free Satellite Receivers and installation -> http://www.vmcsatellite.com/?aid=58456
mySql / VFP / MS-SQL
"David" <da***@scene-double.co.uk> wrote in message
news:c1**************************@posting.google.c om... Hi,
I have a field in a table called 'ShipDate'. This particular field has allow null set to no. So by default this sets all the records to show 00/00/0000 in the field for each record that has no data entered.
In my .asp pages I am trying to test against this empty field.
i.e.
If RS("ShipDate") = 0000-00-00 or If RS("ShipDate") = 00/00/0000
The only thing that seems to work is if I am testing for records with a date in that field,
If RS("ShipDate") > 0000-00-00
How can I test if that field is empty ?, nothing seems to work ?
Thanks
David
you did not mention the column/field type for ShipDate
if character type ->
IF RS("ShipDate") = "00/00/0000"
if date type [not datetime]
IF RS("ShipDate") = {00/00/0000}
see if that works for you - your examples below were kinda weird to me.
hth - mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
FREE LONG DISTANCE -> mailto:ex********@efgroup.net
Free Satellite Receivers and installation -> http://www.vmcsatellite.com/?aid=58456
mySql / VFP / MS-SQL
"David" <da***@scene-double.co.uk> wrote in message
news:c1**************************@posting.google.c om... Hi,
I have a field in a table called 'ShipDate'. This particular field has allow null set to no. So by default this sets all the records to show 00/00/0000 in the field for each record that has no data entered.
In my .asp pages I am trying to test against this empty field.
i.e.
If RS("ShipDate") = 0000-00-00 or If RS("ShipDate") = 00/00/0000
The only thing that seems to work is if I am testing for records with a date in that field,
If RS("ShipDate") > 0000-00-00
How can I test if that field is empty ?, nothing seems to work ?
Thanks
David This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: |
last post by:
I'm trying to scan a (binary) file for a string matching a particular
pattern, and am getting unexpected results. I don't know if this is a bug
or just my own misunderstanding of regular...
|
by: John Morgan |
last post by:
I urgently need tom use SP3a upgrade the instance of SQLServer200
MSDE runing on my local machine but I am having problems in doing so.
My first problem is that when I start the set up procedure...
|
by: GL |
last post by:
I am running DB2 8.1.1 on AIX 5.1
Having a problem with a redirected restore.
Once into the restore continue phase, I immediately get the following
“SQL2059W A device full warning was...
|
by: Patrik Huber |
last post by:
Hello!
I got the following Code in Assembler (NASM), which prints out "5" in
realmode:
mov ax, 0xB800
mov es, ax
mov byte , '5'
I want to do the same in gcc now, but I'm stuck. GCC...
|
by: yezi |
last post by:
HI all:
I can not understand the following code , could explain to me in some
easy way:
unsigned long reflect (unsigned long crc, int bitnum) {
// reflects the lower 'bitnum' bits of 'crc'...
|
by: Michael Rudolph |
last post by:
Hi newsgroup,
I try to connect to a host db2 (DB2 OS/390 7.1.2) from my db2 client on
windows (DB2/NT 8.2.3).
Using interactive mode everything works fine (db2, connect to abc user x
using y,...
|
by: Jean-Marc Blaise |
last post by:
Hi folks,
On ESE **DPF** Aix 5L ML06, it seems that since I have applied FP12 +
special build, I get this specific command not work and generate errors in
db2diag.log (the command output is...
|
by: Henryk |
last post by:
Hey there,
I have some problems with the following code snippet on a Virtex-4
PowerPC with a GCC based compiler
char chData;
sprintf(&chData, "%+05.0f", -0.038f); --I get "-000" ???...
|
by: intrader |
last post by:
The regular expression is /(?!((00000)|(11111)))/ in oRe. That is
oRE=/(?!((00000)|(11111)))/
The test strings are 92708, 00000, 11111 in checkStr
The expression used is checkStr.search(oRE). The...
|
by: lokeshrajoria |
last post by:
hello everyone,
i have problem with left shift...can you solve this....
i want to write a simple function which will give output is 32 bit frame:
if input type == 0 -...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |