odbc - Converting Oracle date to Access Data format -



odbc - Converting Oracle date to Access Data format -

good morning,

i linking oracle info (table) through odbc. not have command on how table design or info stored.

however, info column in coming in text info type in next format, example: 20120110

i used next code convert date in access:

cdate(right([example.my_date],2) & "/" & mid([example.my_date],5,2) & "/" & left([example.my_date],4))

this converts date to: 01/10/2012

is right way going?

i getting mix results, meaning result set on query not accurate, want create sure conversion method right.

example:

`select

cdate(right([example.my_date],2) & "/" & mid([example.my_date],5,2) & "/" & left([example.my_date],4)) format_date

where (((cdate(right([xample.my_date],2) & "/" & mid([xample.my_date],5,2) & "/" & left([xample.my_date],4)))>#01/09/2012#)

order

cdate(right([example.my_date],2) & "/" & mid([example.my_date],5,2) & "/" & left([example.my_date],4))`

thanks everyone!

have tried using 'dateserial' function instead:

date = dateserial(left(mydate, 4), mid(mydate, 5, 2), right(mydate, 2))

date serial should convert date default format environment e.g in english language format rather american format etc.

so sql may this:

select dateserial(left(mydate, 4), mid(mydate, 5, 2), right(mydate, 2)) format_date tablename dateserial(left(mydate, 4), mid(mydate, 5, 2), right(mydate, 2)) > #01/09/2012# order dateserial(left(mydate, 4), mid(mydate, 5, 2), right(mydate, 2))

ms-access odbc

Comments

Popular posts from this blog

delphi - blogger via idHTTP : error 400 bad request -

c++ - compiler errors when initializing EXPECT_CALL with function which has program_options::variables_map as parameter -

How do I check if an insert was successful with MySQLdb in Python? -