Hi
i use this query
sQuery = "Insert into " & txttablename.Text & " In '" & txtmaster.Text & "' select * from " & sTableName & " In '" & txtpath.Text & "\" & sArrayFolder(icount) & "\" & sDirFolder & "' where YP1VStartTime >= # " & Format(DTPFrom.ToString ("dd/MM/yyyy hh:mm:ss tt")) & " # and Yp1VEndTime <= # " & Format(DTPTo.ToString ("MM/dd/yyyy hh:mm:ss tt")) & " # "
it shows the error
"Overload resolution failed because no accessible 'ToString' accepts this number of arguments."
is there any method to show date with time like this i did this in vb6.0 using format function but not getting in vb.net
Yp1EStartTime >= #05/01/2008 12:00:00 AM# AND Yp1EEndTime <= #05/23/2008 11:59:59 PM#
thanks in advance
DTPFromDate is an instance of the datetime object yes?
DTPFromDate.ToString("dd/MM/yyyy hh:mm:ss tt")
or
DTPFromDate.ToString("dd/MM/yyyy")
if the start date was for "May 21st 2008, 9:51:30 AM" then the first one would print out:
"21/05/2008 09:51:30 AM"
And the 2nd one would print out:
"21/05/2008"