• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 320
  • Last Modified:

Merge dateTime from 2 seperate values

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
juststeve
Asked:
juststeve
1 Solution
 
LowfatspreadCommented:
convert(datetime,convert(char(8),THEDATEPART,112)+substring(convert(char(25),TheTimePArt,113),12,13))
0
 
juststeveAuthor Commented:
Thankx!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now