Converting date value to US format

  • Thread starter Thread starter Bogdan Zamfir
  • Start date Start date
B

Bogdan Zamfir

Hi,

I use an Access BE, and I need to use an update SQL query to update a
datetime field
In my locale date format is dd/mm/yy, but in Access SQL date must bhe
formatted as mm/dd/yy in order to be able to update database, as follows

Update Project set EndDate = "01/31/03" where ProjectID = 100

So I have to convert my date 31 january 2003 to US format (mm/dd/yy)

How can I accomplish this?

I knowe I can use myDateVar.GetDateTimeFormats(...), but I don't know what
parameter should I use to specify the format

Thank you

Bogdan
 
| So I have to convert my date 31 january 2003 to US format (mm/dd/yy)
|
| How can I accomplish this?

For example:

Dim MyDate as DateTime = DateTime.Now()
Dim MyString as String = MyDate.ToString("yyyy\/MM\/dd")
 
Back
Top