Why is the second one in quotes?

You shouldn't need to do that as long as you convert things right

There's too much there for me to break out easily without seeing the
data, but if I'm right, you're trying to make a date/time calculated out
of a date/time field, right?

> -----Original Message-----
> From: Shahzad.Butt [mailto:[EMAIL PROTECTED]
> Sent: Friday, January 09, 2004 12:04 PM
> To: CF-Talk
> Subject: RE: TSQL problem
>
>
> Following is the query
>
> SELECT
>
> DateAdd(Day, CAST(LEFT(CAST(PanelLocalDT AS Decimal(10,5)),
> CHARINDEX('.', CAST(PanelLocalDT AS Decimal(10,5)))-1) AS INT),
> '1899-12-30')
>
>     + ' '
>
>     + 'CAST(((CaST(RIGHT(CONVERT(decimal(10,4),PanelLocalDT),
> LEN(CONVERT(decimal(10,4),PanelLocalDT)) -
> charindex(''.'',CONVERT(decimal(10,4),PanelLocalDT))) AS
> Float(8)) / 100
> * 1440 / 100) / 60 ) AS int(4))
>
>         :
> CAST(((CaST(RIGHT(CONVERT(decimal(10,4),((CaST(RIGHT(CONVERT(d
> ecimal(10,
> 4),PanelLocalDT), LEN(CONVERT(decimal(10,4),PanelLocalDT)) -
> charindex(''.'',CONVERT(decimal(10,4),PanelLocalDT))) AS
> Float(8)) / 100
> * 1440 / 100) / 60 )),
> LEN(CONVERT(decimal(10,4),((CaST(RIGHT(CONVERT(decimal
>         (10,4),PanelLocalDT),
> LEN(CONVERT(decimal(10,4),PanelLocalDT)) -
> charindex(''.'',CONVERT(decimal(10,4),PanelLocalDT))) AS
> Float(8)) / 100
> * 1440 / 100) / 60 ))) -
> charindex(''.'',CONVERT(decimal(10,4),((CaST(RIGHT(CONVERT(dec
> imal(10,4)
> ,PanelLocalDT), LEN(CONVERT(decimal(10,4),PanelLocalDT)) -
>         charindex(''.'',CONVERT(decimal(10,4),PanelLocalDT))) AS
> Float(8)) / 100 * 1440 / 100) / 60 )))) AS Float(8)) / 100 * 60 / 100)
> ) AS Int(4))
>
>         : 00' myDate
>
> >From dbo.AFxEvents
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to