p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

activex_data_objects thread: GetRows and date format problem


Message #1 by "Mahmudul Islam" <sohelcse@c...> on Fri, 6 Jul 2001 18:49:08
To show records in the entry form, we open a recordset, transfer data to 

an array using GetRows and loop through the array to show records in 

screen. Now, our system short date format is 'MM/DD/YYYY', but we have to 

use 'DD-MM-YYYY' in our software (business requirements). Now, when we do 

a GetRows, VB automatically transforms the date fields to MM/DD/YYYY 

format. When we show the record we used format(recArray(0,0), 'DD-MM-

YYYY'), which switches the month and day fields. So, how can we show the 

data correctly? 
Message #2 by Kyle Burns <kburns@c...> on Fri, 6 Jul 2001 16:57:43 -0500
Have you tried massaging the date format in the SQL that retrieves your

recordset.  Depending on the DBMS you can use CONVERT, FORMAT, etc.



-----Original Message-----

From: Mahmudul Islam [mailto:sohelcse@c...]

Sent: Friday, July 06, 2001 1:49 PM

To: ActiveX_Data_Objects

Subject: [activex_data_objects] GetRows and date format problem





To show records in the entry form, we open a recordset, transfer data 

to

an array using GetRows and loop through the array to show records in

screen. Now, our system short date format is 'MM/DD/YYYY', but we have 

to

use 'DD-MM-YYYY' in our software (business requirements). Now, when we 

do

a GetRows, VB automatically transforms the date fields to MM/DD/YYYY

format. When we show the record we used format(recArray(0,0), 'DD-MM-

YYYY'), which switches the month and day fields. So, how can we show 

the

data correctly?






  Return to Index