On Feb 12, 2007, at 5:56 AM, Lennox Jacob wrote:

Thanks Norman,
Sorry to be a pain, I tried that myself too, but it gives Tuesday, August 1980 - the date 12 is not there, try it out in an editfield in RB2007R1 and you will see.
Lennox

There's an extra space in there before " August" so it messes up the splitting of the day and month.
And I had the day and month backwards

dim weekday as string
  dim monthPart as string
  dim month as string
  dim day as string
  dim year as string

  weekday = nthfield(dateStr,",",1)
  monthPart = trim(nthfield(dateStr,",",2)) // note the TRIM !!!!

  day = nthfield(monthPart," ", 2)
  month = nthfield(monthPart," ", 1)

  year = nthfield(dateStr,",",3)

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

_______________________________________________
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