Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
JJ297
Aged Yak Warrior
940 Posts |
Posted - 2010-04-20 : 13:36:03
|
| I'm getting an expression expected after the Elseif and end of statement expected after replace="00" Dim dt As Date If Trim(stDt) = "" Then dt = Nothing Elseif stDt = "24" replace="00" Else dt = Date.ParseExact(stDt, fmt, Nothing) End If Return dt End Function |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
JJ297
Aged Yak Warrior
940 Posts |
Posted - 2010-04-20 : 13:50:46
|
| Okay thanks! |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-04-21 : 01:19:42
|
you can try likeDim dt As DateIf Trim(stDt) = "" Thendt = NothingElseifstDt = "24" replace="00"Elsedt = Date.ParseExact(stDt, fmt, Nothing)End IfEnd IfReturn dtEnd Function ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
JJ297
Aged Yak Warrior
940 Posts |
Posted - 2010-04-21 : 13:08:10
|
| Great thanks! |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-04-21 : 23:35:52
|
| welcome------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|