Suntower
Posts: 225
|
| Posted: 08/18/2006, 3:30 PM |
|
Hi,
We have a SQL db with lots of legacy data where dates are stored as INTs. This is usually no problem as we have lots of scripts which easily
CAST() the ints into date format and back as needed.
Now... I've figured out how to modify the BeforeShowRow method to properly display these INTs as dates.
BUT... how do I get them back from the user's input into INTs. When the form sends the text box value '06/15/2006' back to the database after an update, VBScript gives an error.
So, I tried changing the UPDATE to
WhateverDate = CINT( MYFORM.WhateverDate.Value)
...but that gives a VBScript 'overflow' error,
So... how does one convert the text date '06-15-2006' to the value I need?
TIA,
---JC
_________________
---On a campaign for more examples and better docs! |
 |
 |
tonyk
Posts: 163
|
| Posted: 08/19/2006, 4:05 PM |
|
Might this page help? http://www.ilovejackdaniels.com/asp/vbscript-date-format-functions/
Tony
|
 |
 |
Suntower
Posts: 225
|
| Posted: 08/19/2006, 4:32 PM |
|
Hey thanks! I'll look at it ASAP. (At least, the web site sure looks interesting. (hic)
Cheers,
--JC
Quote tonyk:
_________________
---On a campaign for more examples and better docs! |
 |
 |
tonyk
Posts: 163
|
| Posted: 08/19/2006, 6:08 PM |
|
Hope it helps 
BTW JD is not a bad drink but I never realized until skiing in Breckenridge just how many Bourbons there are and just how good they are, we see only a small fraction in UK.... but thats for another forum!
Tony
p.s. have a glass when you're done!
|
 |
 |
|