473,320 Members | 2,124 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,320 software developers and data experts.

Want to separate access date/time column in to two using vb.net

4
I have an access 2007 data base.it has a date/time column.I want to get that column in to vb.net 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
7 4075
udari
4
Some one please help me soon..
Aug 1 '13 #2
Killer42
8,435 Expert 8TB
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
Killer42
8,435 Expert 8TB
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
udari
4
Can you send me the code
Aug 1 '13 #5
Killer42
8,435 Expert 8TB
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
udari
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
Killer42
8,435 Expert 8TB
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

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

Similar topics

0
by: Andrew | last post by:
I am currently in the process of building a calender/date MySQL table that will be searched for available dates for holiday tours? I want to use a time column as there will be a restriction on...
1
by: Jacquo Johnson | last post by:
I am receiving the following error: MS Access Date/Time DBD::ODBC::st execute failed: , , " . "FROM WHERE > '2004/02/01 11:16:16'"; $sth = $dbh->prepare($sqlstatement); $sth->execute ||...
3
by: Kristen | last post by:
I need to query an Access database via VB and get a count of all the calls where the start time is between a 2 certain days/times. For example, all the calls that occurred from Saturday @ 8am to...
3
by: fong.yang | last post by:
I have a textbox on my form label date/time. I also added a date/time column to my table as well. The table already contains records before the date/time column was added. How do I setup a...
1
by: anthony.ting | last post by:
I've written a vba module that takes several .csv files and imports them all into access using a pre-defined specification. All is good if I set the spec up to import the following as text: ...
6
by: gre1unix | last post by:
I am new to VBA Access. I create "mytable" with 2 columns from existing main table by giving start date and end date. Given below is mytable. First column: dt( date hr:min:sec format ) Second...
1
by: kbaisch | last post by:
I have a column with smalldatetime data type. When I run a query, it shows date and time, I only want the date adn to delete the time. It looks like this: 1979-04-25 00:00:00 What is the script...
1
by: chandurp | last post by:
Is there any attribute which indicate the last access date/time a user accessed DB2?
2
by: Ducknut | last post by:
Hi all, I was thinking that an expert like FishVal might be interested in solving this one (based on his name). I have several fish tagged with radio telemetry tags. These tags send a signal to a...
9
mikek12004
by: mikek12004 | last post by:
I have a column date with 'Date/Time' type which holds values like this 8/4/2009 for the 4th day of the 8th month of 2009, due to some bug many records write instead 8/4/4009 so I want for those...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.