Hi,
I have a slight problem, when I do a 'Convert.ToDateTime' it converts it to a UK type date, which is correct as the server and application is all UK based. However our SQL Server will only accept dates in US format for some reason and I cant seem to find anything in the SQL Server program to change it to accepting UK dates. So im having to convert the date over in the script.
I have been told the best way to do it is by using 'cultures' but I have been trying to do this and dont have a clue so ive had to revery back to old style VBScript and do this:
Dim strFrmDate as String = frmDate.Text
Dim datFrmDate as DateTime = Convert.ToDateTime(strFrmDate) sbSql.Append(" AND tblPurchaseOrders.datRaised = '" & Month(datFrmDate) & "/" & Day(datFrmDate) & "/" & Year(datFrmDate) & "'")
|
Does anyone have a more efficient way of sorting this out??
Thanks
- Carl S