I never retype variables. I would use 

SET VAR vtDate TEXT
SET VAR vDate DATE
DIALOG ... vtDate ...
SET VAR vDate = &vtDate


"Troy Sosamon" <[EMAIL PROTECTED]> wrote:

>Just change the var type.
> 
>set var vdatetext text
>dialog vdatetext 1 1 ....
> 
>set var vdatetext date
>if vdatetext is null
> � -- invalid date
>endif
> 
> 
>Troy
> 
>
>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of J.
>Stephen Wills
>Sent: Monday, July 14, 2003 9:46 AM
>To: RBASE-L Mailing List
>Subject: [RBASE-L] - Text To Date Conversion
>
>
>Okay, suppose that I'm using a DIALOG to acquire user-input of a
>date-string, MM/DD/CCYY. �
>Now, I want to convert this string into a DATE-type, fm its
>DIALOG-implied type of TEXT. �
>As I don't see this type of conversion function "built in", 
>I was wondering what y'all might have to say to advise me.
> 
>Here are some of my thoughts on the topic, assuming a TEXT value of
>08/17/1991 
>f/var named vDateText (not a random value, our anniversary date, umm',
>if I recall correctly) :
> 
>- I could :
> �SET VAR vDateTextNew TEXT = ( CHAR(34) + .vDateText DATE + CHAR(34) )
> �then
> �SET VAR vDateType DATE = &vDateTextNew
> �but, I'm having trouble getting that second double-quote to suffix
>properly
> �(Yep', Bill, because you once asked, I'm still using DBL-Quotes, )
> �(but let's chat about that later, unless it's of issue here ... �)
> 
>- I also could create 3 INT's 
> �SET VAR vIMON INT = (INT(SGET(.vCutoffDateTXT,2,1)))
> �SET VAR vIDAY INT = (INT(SGET(.vCutoffDateTXT,2,4)))
> �SET VAR vIYR4 �INT = (INT(SGET(.vCutoffDateTXT,4,7)))
> �then
> �SET VAR vDateType = (RDATE(.vIMON, .vIDAY, vIYR4)) 
> 
>- I know that I could use a form w/a DATE-type variable, 
> �or even a DATE field fm a DUMMY table, so I wouldn't have to fool
>w/this, 
> �but I've chosen not to do that, at least f/now.
> 
> 
>DATE SETTINGS ARE :
> 
>FORMAT � �MM/DD/YYYY
>SEQUENCE �MMDDYYYY
>CENTURY � 30
>DEFAULT � 19
> 
> 
>TIA,
>Steve in Memphis
>
>


-- 
Albert Berry
Full Time Consultant to
PSD Solutions
350 West Hubbard, Suite 210
Chicago, IL 60610
312-828-9253 Ext. 32


__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455

Reply via email to