Hi
I am using SQL Database . I have written this statement
rs.Open "Select distinct(Shiftcode) from shift where effectivefrom=(select max(effectivefrom) from shift where effectivefrom <= '" & Format(DTPicker1.Value, "MM/dd/yyyy") & "')", cnn1, adOpenDynamic, adLockOptimistic, adCmdText
In Database Date has been stored in format dd/MM/yyyy. In Select statement i have given "MM/dd/yyyy" format.
Regional Settings Date Format is dd/MM/yyyy. I want to know how Date Format functions with VB & SQL.
Thanks
I am using SQL Database . I have written this statement
rs.Open "Select distinct(Shiftcode) from shift where effectivefrom=(select max(effectivefrom) from shift where effectivefrom <= '" & Format(DTPicker1.Value, "MM/dd/yyyy") & "')", cnn1, adOpenDynamic, adLockOptimistic, adCmdText
In Database Date has been stored in format dd/MM/yyyy. In Select statement i have given "MM/dd/yyyy" format.
Regional Settings Date Format is dd/MM/yyyy. I want to know how Date Format functions with VB & SQL.
Thanks