Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting MSAccess DateTime Field

Status
Not open for further replies.

solmskid

ISP
Feb 24, 2003
56
US
Creating report in CRv9, datasource is MSAccess DB.
Situation: the field I am trying to use is defined as a date/time field in MSAccess. When I go directly to the source to view the date, the format is 12-01-2005. But when I look at the same field in CR Field Explorer the format is 01-Dec-2005 0:00. I can reformat the field, but the date is all jumbled (ex: change to mm-dd-yy ends up 07-12-250
I have no idea of what is happening, can anybody suggest something? other then forgetting the whole thing.

-l
 
What connectivty are you using to use MS Access?

Try a Crystal formula instead of the using the database field:

date({table.datetimefield})

You can also create an Access query to alter the datetime to a date field and use the Access Query within Crystal.

Also stating that you go to the source and view it means nothing, try using real technical terms, going to the source implies that you open up the source code and view soemthing, do you mean that you checked the data type in Access, or view the field in a canned Access application and it shows something differnt, or?

-k
 
Thanks for the reply....
Just using the access/exel connection in CR. Went into MSAccess to view the data in the table, 1) viewed by opening the table, 2) then viewed in design mode to verify the data type.
In CR, used CDate {table.datetimefield} which I understand to be equivalent to Date{table.field} and DateValue {table.field}.

-l
 
OK, you used cdate and it worked, or?

Not sure what your last post was supposed to ask or state happened.

You can also use ODBC to connect to Access.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top