473,385 Members | 1,597 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,385 software developers and data experts.

convert column into datetime format

Hi,

I have a text file that contains a date column. The text file will be
imported to database in SQL 2000 server. After to be importing, I want
to convert the date column to date type.

For ex. the text file look like

Name date
Smith 06092006 023718

It would be converted date column to ydm database in SQL 2000 server.
In the table it should look like this

Name Date
Smith 2006-09-06 hh:mm:ss.mmm

i used the query

select convert(varchar(15), getdate(), 25) from table name

which gives me the current date in the desired format...how can i replace the current date parameter to include the column 'Date'???


Much thanks in advance
appreciate if someone can help on this....
Sep 12 '06 #1
0 5724

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

Similar topics

1
by: Loi Tan Vo | last post by:
Hi, I have a text file that contains a date column. The text file will be imported to database in SQL 2000 server. After to be imported, I want to convert the date column to date type. For...
1
by: Google Jenny | last post by:
Precisely, here's what I need: When I run getdate(), I get, for example: August 9 2004 5:17 P.M. I want to turn the date portion into: 8/9/2004 format and update one column with it
11
by: jguilford | last post by:
I have created a SQL Stored Procedure that uses a Case statement to determine the Order By. For one of the Case statements I am trying to turn a Char field into Datetime in for the Order By,...
19
by: Owen T. Soroke | last post by:
Using VB.NET I have a ListView with several columns. Two columns contain integer values, while the remaining contain string values. I am confused as to how I would provide functionality to...
5
by: Learner | last post by:
Hello, Here is the code snippet I got strucked at. I am unable to convert the below line of code to its equavalent vb.net code. could some one please help me with this? static public...
2
by: santoshpayal | last post by:
Hi, I have a text file that contains a date column. The text file will be imported to database in SQL 2000 server. After to be importing, I want to convert the date column to date type. For...
2
by: kirke | last post by:
Hi, I have a datetime column named dtDateTime. its format is "Oct 27 2006 12:00:00 " I want to group by only date part of it and count my code is $sql1="SELECT ...
1
by: izziy | last post by:
Our legacy DB has a bad column which stores a date value as char(8), it has a format like 'MMDDYYYY'. I am creating a report to report this particular date and also use this date to specify a...
7
by: crs27 | last post by:
Hai, Im new to sql server... I want to convert a field in a table to DateTime. The column(Column Name-DDateTime , Data type String) has data in this format 01-04-2008 15:12:52 i want...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...

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.