This should help:

VB Code:
  1. Option Explicit
  2.  
  3. Private Sub Form_Load()
  4. Dim x As Integer
  5. Dim strdatetime As String
  6. strdatetime = "10-Dec-05 08:50:25.000"
  7. MsgBox (strdatetime)   'gives me 10-Dec-05 08:50:25.000
  8. x = InStrRev(strdatetime, ".") - 1
  9. If x > 0 Then
  10.  strdatetime = Left(strdatetime, x)
  11. End If
  12. MsgBox Format(strdatetime, "dd-mmm-yy hh:mm:ss")
  13. End Sub