473,396 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Conversion of date/ time fields

I have adatabase which daily imports data from a spreadsheet to a
named table. The spreadsheet contains one filed which is date AND time
whereas in the table I have one field being date which is formatted
to short date,.The data looks OK in the table with only a date showing
but wen I examine the date field I can expand it to see also the time.
This is causing some problems with other routines using the table.
Can anybody advise how I can actually REMOVE the time details from the
field so that I have only a date field ?

Thank you
Gerry

Oct 3 '07 #1
2 1761
Use an Update query to remove the time part of the field.

Example:
UPDATE Table1
SET Field1 = DateValue(Field1)
WHERE Field1 Is Not Null;

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"GerryWiles" <ge***@colvan.co.ukwrote in message
news:11**********************@22g2000hsm.googlegro ups.com...
>I have adatabase which daily imports data from a spreadsheet to a
named table. The spreadsheet contains one filed which is date AND time
whereas in the table I have one field being date which is formatted
to short date,.The data looks OK in the table with only a date showing
but wen I examine the date field I can expand it to see also the time.
This is causing some problems with other routines using the table.
Can anybody advise how I can actually REMOVE the time details from the
field so that I have only a date field ?

Thank you
Gerry
Oct 3 '07 #2
On Oct 3, 5:52 am, "Allen Browne" <AllenBro...@SeeSig.Invalidwrote:
Use an Update query to remove the time part of the field.

Example:
UPDATE Table1
SET Field1 = DateValue(Field1)
WHERE Field1 Is Not Null;

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"GerryWiles" <ge...@colvan.co.ukwrote in message

news:11**********************@22g2000hsm.googlegro ups.com...
I have adatabase which daily imports data from a spreadsheet to a
named table. The spreadsheet contains one filed which is date AND time
whereas in the table I have one field being date which is formatted
to short date,.The data looks OK in the table with only a date showing
but wen I examine the date field I can expand it to see also the time.
This is causing some problems with other routines using the table.
Can anybody advise how I can actually REMOVE the time details from the
field so that I have only a date field ?
Thank you
Gerry- Hide quoted text -

- Show quoted text -
Or, you could just format it for date. format(myDate,"mm/dd/yy") or
select "Short Date" in format property.

Oct 3 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: nimish | last post by:
I have Month, Day and Year fields on my form. When I submit this form I want to create a valid date from all three fields before inserting into MYSQL table. I tried following:...
3
by: praba kar | last post by:
Dear All, I have doubt regarding date string to time conversion function. In Python I cannot find flexible date string conversion function like php strtotime. I try to use following type...
1
by: heirou | last post by:
I'm a novice in this subject....I've made a database that requires a time conversion. For example, if local time is 1200, determine the time in Korea. I use two fields: a date field, and a time...
8
by: Ishbel Kargar | last post by:
Since upgrading from old laptop (Windows 98) to new laptop (Windows XP), my mail-merge letters are doing strange things with date formats. For instance, my reminder letter for lapsed subs carries...
8
by: William Bradley | last post by:
First of all I have been working with Access 97 and this morning the owner of the business phoned me to inform me that he had updated to Access 2000 and parts of my forms would not work anymore. ...
1
by: Shahzad | last post by:
Dear Respected Gurus/Sirs, I would like to share your ideas and get reviews will be highly appreciated in anticipation Question No.1 I had developed a seprate audit/security database that...
4
by: Annie D via AccessMonster.com | last post by:
Problem! I have a series of CSV files that I am bringing in to Access, contained within each of them are 6 date fields, however, they are not being recognized as dates…this is a big problem!...
8
by: John Wildes | last post by:
Hello all I'm going to try and be brief with my question, please tell me if I have the wrong group. We are querying transaction data from a DB3 database application. The dates are stored as...
5
by: Ivan Velev | last post by:
Hello, Minimal example below - it gives me different output if I comment / uncomment the extra time.mktime call - note that this call is not related in any way to main logic flow. When...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.