Converting SQLite Dates


I have an old app that stores dates in the Long format in a SQLite table as Sunday, October 12, 2014.

I want to convert all the dates to a format so I can search between dates in the sqlite date format: 2014-10-12.

I can’t seem to figure out a way to do this. I am using this code

txtOldDate.Text=rsO.Field("Date22") Dim d as Date d = rsO.Field("Date22").dateValue if NOT (d is nil ) Then txtNewDate.Text=d.SQLDate end if

When I run the code I get an UnsupportedFormatException.

Does anyone know how this could be done? Any help would be greatly appreciated.

  Dim d as Date
 if parseDate(rsO.Field("Date22").stringValue,d) then 
  end if

Thanks so much Dave. That worked great. I really appreciate you taking the time to help me.
Thanks again.