CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 How To Use Custom Update Type For DATE ---> Int Conversion

Print topic Send  topic

Author Message
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!
View profile  Send private message
tonyk

Posts: 163
Posted: 08/19/2006, 4:05 PM

Might this page help?
http://www.ilovejackdaniels.com/asp/vbscript-date-format-functions/

Tony
View profile  Send private message
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) :-D

Cheers,

--JC


Quote tonyk:

_________________
---On a campaign for more examples and better docs!
View profile  Send private message
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!
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.