Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21153

Date Format

$
0
0
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

Viewing all articles
Browse latest Browse all 21153

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>