Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SET DATE TO BLANK 3

Status
Not open for further replies.

randallJ

IS-IT--Management
Aug 15, 2000
90
GB
Hi

This is probably really easy but can't seem to get my head around it.

How do you clear a date field. E.g a date field has an existing date in it and I want to remove that date and make the field blank.


 
Thanks all - I had tried various combinations of ctod() but always got the "argument mismatch" error.
 
Hi

Sorry to doubt the fundamentals..

When you say field, every one here assumed it is a field in your table or database. By any chance do you mean that the variable which holds a data field (a field of a table).

If it is variable, you can try..
myDateVariable = CTOD("")
or
myDateVariable = {}
or
myDateVariable = {//::}

try it. :)



____________________________________________
ramani - (Subramanian.G) :)
 
Randall:

You have all the possible solutions listed above. You might consider this.

If it is not a conditional BLANK out then you can try

alter table ToughTable alter column DATEFIELD c(8)
replace all DATEFIELD with ' '

* if you need back to date type.
alter table ToughTable alter column DATEFIELD d

I hope this will help.


try it.

Nasib Kalsi

 
ok, if you have "argument mismatch" error
- now it's time to make sure you have indeed date field...
Check first this:
a={}
?type("a")
-- types D
a={/:}
?type("a")
-- types T
Now, what type is your field?
?type("your.field")
???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top