On Feb 11, 2007, at 3:39 PM, Lennox Jacob wrote:

Thanks Russ and Norman,

So, I use a text editor and manually change Tuesday, August 12, 1980 to Tuesday, 12 August 1980 and all is well. When I save and then reopen there is no problem because the formatting has already been corrected. It means that I have to change the date of birth manually when I want to open any old file. That is what I would like to get done, changing that old format to the new format, seemlessly, in the background.

Any advice or recommendations.

If you read the "date" in a s a string see if it has 2 commas and if it does you know it is the old format
Delete the second comma and away you go

something like

   // assuming the date of interest is in dateStr already

   select case countFields(dateStr,",")
   case  2
          // this date is already like Tuesday, 12 August 1980
   case 3
         // this date is like Tuesday, August 12, 1980
        dim weekday as string
        dim month as string
        dim year as string
        
        weekday = nthfield(dateStr,",",1)
        month = nthfield(dateStr,",",2)
        year = nthfield(dateStr,",",3)

        dateStr = weekDay + ", " + month + " " + year

   else
       // something else
   end select

  // now use parse date on dateStr

        
_______________________________________________
Unsubscribe:
<[EMAIL PROTECTED]>

REAL Software has decided to consolidate this mailing list with the online Forums.  
On Monday, February 12, 2007, this mailing list will no longer be active.  We 
encourage you to continue your REALbasic and REAL SQL Server discussions on the 
Forums.  If you are not presently a member of the forum, please sign up today at 
<http://forums.realsoftware.com>.

Reply via email to