ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Trim Data in a Query (https://www.excelbanter.com/excel-programming/329847-trim-data-query.html)

Jonathan

Trim Data in a Query
 
I am querying an Access database form excel, however one of the fields in the
db contains both date and time elments - I want to know if there is a way to
trim out the time portion of the field in query so that I only have to
referesh rather than edit all the time.

Tia

Jonathan

David

Trim Data in a Query
 
Hi,
What are you doing with the data? Are you writing it somewhere? You say you
are editing it each time, where are you doing this?

Thanks,

"Jonathan" wrote:

I am querying an Access database form excel, however one of the fields in the
db contains both date and time elments - I want to know if there is a way to
trim out the time portion of the field in query so that I only have to
referesh rather than edit all the time.

Tia

Jonathan


Jonathan

Trim Data in a Query
 
The database is storing Stock Take inormation, I am pulling data from the
previous days stock take to inport into our main Fox Pro db. Becuase of the
way Fox Pro needs the data I need to remove the "time" eliment from the
Access db data so that I can import into Fox Pro.

I want to have a parameter where I just input the required date, however
becuase the access db field contains both date & time data I can't -
therefore I want to have this element (i.e. time) part of the date/time field
not included in the query.

I have settle for cell formatting in Excel but this still doesn't get me
part having to go into Query to query the required date.

Any pointers would be greatly appreciated.

Jonathan

"David" wrote:

Hi,
What are you doing with the data? Are you writing it somewhere? You say you
are editing it each time, where are you doing this?

Thanks,

"Jonathan" wrote:

I am querying an Access database form excel, however one of the fields in the
db contains both date and time elments - I want to know if there is a way to
trim out the time portion of the field in query so that I only have to
referesh rather than edit all the time.

Tia

Jonathan


David

Trim Data in a Query
 
Hi,
I am not sure about whn you get it via the query, but you should not have to
edit the field, column. I believe you can selct the whole column it ends up
in and change the format. Right click on the column header and choose
Format/Date and pick the format you wish. I hope this helps. You might pose
this question in the Access forum? There might even be one for SQL?

Thanks,

"Jonathan" wrote:

I am querying an Access database form excel, however one of the fields in the
db contains both date and time elments - I want to know if there is a way to
trim out the time portion of the field in query so that I only have to
referesh rather than edit all the time.

Tia

Jonathan



All times are GMT +1. The time now is 12:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com