Steve
  You can also use this

******* One way ***********
   SET VAR VDateFinal DATE

   SET VAR VInputDate TEXT
   DIAL 'Enter date' VInputDate =10 VEndKey 1 AT 10
   SET VAR VInputDate DATE

   IF VInputDate IS NULL THEN
     PAUSE 2 USI 'Invalid date Entered....program aborted' AT 10
     GOTO Done
   ELSE
     SET VAR VDateFinal = .VInputDate
   ENDIF
***** End One Way**********

********Another Way********
   SET VAR VDateFinal DATE

   SET VAR VInputDate TEXT
   DIAL 'Enter date' VInputDate =10 VEndKey 1 AT 10

   SET VAR VDateFinal = .VInputDate

   IF VDateFinal IS NULL THEN
     PAUSE 2 USI 'Invalid date Entered....program aborted' AT 10
     GOTO Done
   ENDIF
*********End Another Way************


Buddy



-----Original Message-----
From: J. Stephen Wills [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 15, 2002 1:03 PM
To: [EMAIL PROTECTED]
Subject: RE: String_To_Date?


Thanks, Buddy.  I'm trying to do this in a WHILE-loop at the start of a
command file.  What you sent me works, as long as the quotes are there.  I'm
getting the date-value from the user via input into a DIALOG.  Of course,
the user won't put quotes into it.  So, I'll pre- & suffix the user's input
w/the current quote setting, then do what you showed me.

Thanks,
Steve in Memphis

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Walker, Buddy
> Sent: Monday, July 15, 2002 11:37 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: String_To_Date?
>
>
> Steve
>
>    This should work.
>
>    SET VAR V1 TEXT = ('06/30/2002')
>    SET VAR V2 DATE = .V1
>
>    Notice don't put () around .v1 or you will get an error that the data
> type does not match.
>
>
> Buddy
>
>
> -----Original Message-----
> From: J. Stephen Wills [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 15, 2002 12:27 PM
> To: RBase List Server
> Subject: String_To_Date?
>
>
> How do I convert a string, such as :
>
>       "06/30/2002"
>
> to a DATE-type variable?
>
> Surely there's and easier way than to use 3 SGET's to extract the MM, DD,
> and CCYY components, then use RDATE?
>
> TIA,
> Steve in Memphis
>
> ================================================
> TO SEE MESSAGE POSTING GUIDELINES:
> Send a plain text email to [EMAIL PROTECTED]
> In the message body, put just two words: INTRO rbase-l
> ================================================
> TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
> In the message body, put just two words: UNSUBSCRIBE rbase-l
> ================================================
> TO SEARCH ARCHIVES:
> http://www.mail-archive.com/rbase-l%40sonetmail.com/
> ================================================
> TO SEE MESSAGE POSTING GUIDELINES:
> Send a plain text email to [EMAIL PROTECTED]
> In the message body, put just two words: INTRO rbase-l
> ================================================
> TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
> In the message body, put just two words: UNSUBSCRIBE rbase-l
> ================================================
> TO SEARCH ARCHIVES:
> http://www.mail-archive.com/rbase-l%40sonetmail.com/
>

================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/

Reply via email to