August 22, 2006 at 10:09 am
Hello!
How can i convert two columns (Date, Time) into one column (DateAndTIme)?
I'm trying write a transformation in VB code..
Thanks
Claudia
Cláudia Rego
www.footballbesttips.com
August 22, 2006 at 6:40 pm
Not sure if this what you are looking for but here is a VB sample:
in T-SQL you would use convert in place of CDate and Cast/Convert in place of Cstr
Private Sub teststuff()
Dim a As Date
Dim b As Date
Dim c As String
a = "12/12/2006" 'Date Value
b = "15:30:00" 'Time Value
c = CStr(a) + " " + CStr(b) 'Date Time Value as a string
c = CDate(c) 'Date Time Value converted
MsgBox c 'Just to see it populated
'(NOTE: msgbox in DTS doesn't work)
End Sub
-
August 28, 2006 at 10:31 am
Thanks!!
It works
Claudia
Cláudia Rego
www.footballbesttips.com
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply