falkon_tech
New member
- Joined
- Sep 21, 2005
- Messages
- 4
- Programming Experience
- 5-10
I am building an import program that reads a text file and inserts it into a SQL table.
One of the fields is a date. So I am doing an IsDate check on every record before it inserts. For some reason "0001-01-01" returns true on the isdate function but when it goes to the stored procedure to insert the record it errors.
Is there any way around this? I know its just a data entry error on the users side, but I cannot fix it and would like to have the import just enter a null value since the date is invalid.
Any thoughts?
Thanks in advance!
One of the fields is a date. So I am doing an IsDate check on every record before it inserts. For some reason "0001-01-01" returns true on the isdate function but when it goes to the stored procedure to insert the record it errors.
Is there any way around this? I know its just a data entry error on the users side, but I cannot fix it and would like to have the import just enter a null value since the date is invalid.
Any thoughts?
Thanks in advance!