I am Having Problem to Convert this Crystal Report formula in SSRS Expression Can Anyone Help me?
Formula 1:
Dim fromExDay as String
Dim toExDay as String
Dim sYr as String
Dim sMonth as String
Dim sDay as String
fromExDay = ToText({wk_TORIO0460_a.HktrExchngDayFrom})
fromExDay = Replace (fromExDay, ",", "" )
fromExDay = Replace (fromExDay, ".", "" )
toExDay = ToText({wk_TORIO0460_a.HktrExchngDayTo})
toExDay = Replace (toExDay, ",", "" )
toExDay = Replace (toExDay, ".", "" )
if Len (Trim(fromExDay)) > 0 and Len (Trim(toExDay)) > 0 then
sYr = Right(Left(fromExDay, 4),2)
if sYr <> "99" then
sYr = LEFT(CStr(CDbl(sYr) + 12),2)
end if
sMonth = Mid(fromExDay, 5, 2)
sDay = Left(Right(fromExDay, 4),2)
'fromExDay = sYr + sMonth + sDay
fromExDay = sYr + sMonth + sDay
sYr = Right(Left(toExDay, 4),2)
if sYr <> "99" then
sYr = LEFT(CStr(CDbl(sYr) + 12),2)
end if
sMonth = Mid(toExDay, 5, 2)
sDay = Left(Right(toExDay, 4),2)
toExDay = sYr + sMonth + sDay
'toExDay = Right(fromExDay, 2)
Formula = fromExDay + " ~ " + toExDay
Else
Formula = ""
End If
Value of ExchangeFrom and ExchangeTO is coming from Database . ExchangeFrom value = 20031031 ExchangeTo value = 200 Is There in Database