HP3000-L Archives

October 1998, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Joe Geiser <[log in to unmask]>
Reply To:
Joe Geiser <[log in to unmask]>
Date:
Sat, 24 Oct 1998 13:53:44 -0400
Content-Type:
multipart/mixed
Parts/Attachments:
text/plain (1899 bytes) , CSILLCProprietary.bas (7 kB)
Attached is a code module we use in Visual Basic applications we create for
our customers.

Because more people are creating Client-Server and ActiveX applications, we
thought it would be nice to share this little ditty, which saves our butts
more times that we care to realize.

To use, just insert this code module into your Visual Basic 5.0 or 6.0
project.

It contains 2 functions:

  DateResult = ConvertDate(DateString$)
  LongFP = ConvertZoned(ZonedNumericAsString$)

The "ConvertDate" function will take any 6 or 8 digit date in either YYMMDD
or CCYYMMDD format in as a string, and bring it out as a "date" formatted
field usable by all Windows date functions.  Pretty simple really, but it
works, and is reusable (we reuse it all the time).

As an added bonus - ever try to use a Zoned decimal numeric in Visual Basic.
Ick, right?  The ConvertZoned function will take any Zoned decimal as STRING
input (it can be stored as a type Z or X in TurboIMAGE, and convert it to a
Long Floating Point numeric usable by Visual Basic.  you can now perform
arithmetic operations on these numbers.  It even handles the overpunched
sign at the end.

Although there are copyright comments in the code, effective today, we are
releasing this code into the public domain.  We'll post a modified version,
indicating the freeware version on our website shortly.  For the time being
though, feel free to use the attached.

(Print this message if you feel CYA is necessary)

Enjoy,

Best Regards,
Joe

==========================================================
Joe Geiser, Senior Partner, CSI Business Solutions, LLC
 ** Your Client-Server and Internetworking Specialists **
Phone: +1 (215) 945.8100  Fax: +1 (215) 943.8408
*New* Toll-Free (US/Canada): (877) 945-8100
http://www.csillc.com      mailto:[log in to unmask]
==========================================================
HP Channel Partner         Allaire Alliance Partner
Microsoft ClubWin - Team One



ATOM RSS1 RSS2