Applies To:
VBS, OTA, Workflow
Issue:
The date format in the database table is yyyy-mm-dd. I need to format the date 4/7/2015 to this format and include 0's on the two digit dates.
Solution:
dStartDate = CDate("4/7/2014")
strParcedStartDate = DatePart("yyyy", dStartDate) & "-" & _
Right("0" & DatePart("m", dStartDate), 2) & _
"-" & Right("0" & DatePart("d", dStartDate), 2)
This gives you a string to work with in the correct format to query the Audit Properties table.