Legacy code problem

J

John

Hi

I am stuck with using some legacy code in my app for time constrain reasons
so please accept my apologies for this. I am using the below code;

rs = New ADODB.Recordset
....
ALLDAYend = fmtDateTime(CDate(rs.fields("company_allday_end")), "hh:mm:ss")

and I am getting a 'Value of type 'ADODB.Field' cannot be converted to
'Date'.' error. Could someone please let me know how can I fix it?

Many Thanks

Regards
 
T

Thomas Hansen

Hi

I am stuck with using some legacy code in my app for time constrain reasons
so please accept my apologies for this. I am using the below code;

rs = New ADODB.Recordset
...
ALLDAYend = fmtDateTime(CDate(rs.fields("company_allday_end")), "hh:mm:ss")

and I am getting a 'Value of type 'ADODB.Field' cannot be converted to
'Date'.' error. Could someone please let me know how can I fix it?

Try DateTime.ParseExact...!!

..t
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top