-
Solved: date error in vb.6 help
[vba]
Dim s5 As String, s6 As String, s7 As String, s8 As String
s5 = Text1.text
s6 = Format(s5, "dd/MM/yyyy")
format(Text1.text,yyyy)
s8 = Format(Text1.text, "yyyy-mm-dd")
s7 = Year(s6)
If (s7 Mod 4) <> 0 Then
sql = "SELECT DateAdd(d, 365, 'S8') As NewDate"
Set rs = Con.Execute(sql)
While Not rs.EOF
If rs.BOF = False Then
MsgBox ((NEWDATE))
End If
rs.MoveNext
Wend
End If
[/vba]
I AM GETTING SYNTAX ERROR CONVERTING DATETIME TO CHARACTER TO STRING
Last edited by shamsam1; 11-22-2008 at 02:31 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules