By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,326 Members | 838 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,326 IT Pros & Developers. It's quick & easy.

Want to separate access date/time column in to two using

P: 4
I have an access 2007 data has a date/time column.I want to get that column in to 2008 data grid view and separate that column in to two columns like date and time and show it in the data grid.Finally want to send that in to a sql server 2000 database.
date/ time like 2013/08/01 4:12:23PM
Aug 1 '13 #1
Share this Question
Share on Google+
7 Replies

P: 4
Some one please help me soon..
Aug 1 '13 #2

Expert 5K+
P: 8,434
I've used a query in Access to pull out just the date from a date/time field. As far as I can recall, I created a column with a value of something like DateValue([FieldName])
Aug 1 '13 #3

Expert 5K+
P: 8,434
By the way, replying to your own message with a "please hurry" is actually more likely to slow down the response, or even prevent you getting one.

If someone is skimming through the forum looking for new messages they could miss yours, because it already has a reply.
Aug 1 '13 #4

P: 4
Can you send me the code
Aug 1 '13 #5

Expert 5K+
P: 8,434
Sorry, I don't have anything handy here right now. However, try this.

Make a new query in Design view. Add your table to it. Set it to show "*" (all fields). Add another two columns, pasting in these values as the "Field:"
DateOnly: DateValue([DT])
TimeOnly: TimeValue([DT])
(Note, I've assumed your field name is DT. Adjust as necessary.)

This will provide a view of your table with the date and time as two extra fields. Your code can then use the query instead of the table.
Aug 1 '13 #6

P: 4
i'm trying to get that date/time value in to a variable and pass in inside a while loop.then divide date and time and finally add that to data base.can i count bits and divide it.
Aug 1 '13 #7

Expert 5K+
P: 8,434
I don't know VB.Net very well, perhaps someone else here can help with that part?

I just figured it would be much simpler if Access gave you the date and time values separately, so you don't have to split them.
Aug 1 '13 #8

Post your reply

Sign in to post your reply or Sign up for a free account.