Adrian!
You pushed me further on to the solution.
As you wrote, if converting a text field to DATE, the conversion process checks 
to see if the text is a valid DATE.

This is a piece of my code:
DIALOG 'Ange start tid (åå/mm/dd)|| !00/00/00;1;_' vstart=10 vendkey 1 +
CAPTION 'Visa registrerade arbeten'

The resultant variable, vstart, is TEXT. Converted to DATE, the result is an 
error if month is larger than 12 or day larger than 31.
The conversion even checks the combination yy/02/30, witch gives an error. 
I love R:base.

Thank you, Adrian, for pushing me.
Christian
  ----- Original Message ----- 
  From: Adrian Huessy 
  To: RBASE-L Mailing List 
  Sent: Sunday, November 30, 2008 7:05 PM
  Subject: [RBASE-L] - RE: Is a date a date?


  Christian

  Have you thought about using a date-field instead of a text field.

  Even you are able to add a PickUp so the user could choose in calendar.

   

  To check it is a date, you could convert to date type. If the result is a 
date and not empty, you get a correct date.

   

  Adrian

   


------------------------------------------------------------------------------

  From: christian hjortmar [mailto:[EMAIL PROTECTED] 
  Sent: Sunday, November 30, 2008 6:38 PM
  To: [email protected]
  Subject: [RBASE-L] - Is a date a date?

   

  Hi!

  I am sitting with an eep that ends up in calling a form.

  To call the form I fill in a start date and an end date.

  What I want to do is to catch an error like if I fill in day 45 or a month 
like15.

  I wish there was a IFDATE function.

  In the mean time I wonder if someone has had a the problem above and solvded 
it in a nice way?

   

  My best to all of you rbasers.

Reply via email to