Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Merge dateTime from 2 seperate values

Posted on 2006-04-29
2
Medium Priority
?
307 Views
Last Modified: 2012-05-05
I have a table created by LogParser that's split out the log's original combined datatime column into 2 seperate columns...one for date and one for time:

2006-04-28 00:00:00.000      2006-01-01 13:07:27.000

I need to merge the time value back into the date column.

thx
0
Comment
Question by:juststeve
2 Comments
 
LVL 50

Accepted Solution

by:
Lowfatspread earned 1000 total points
ID: 16570153
convert(datetime,convert(char(8),THEDATEPART,112)+substring(convert(char(25),TheTimePArt,113),12,13))
0
 

Author Comment

by:juststeve
ID: 16570215
Thankx!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question