Dim dtFirstOfMonth As Date = dtNow.AddDays(-dtNow.Day + 1)
Dim dt As Date = Date.Parse(dtFirstOfMonth)
dt = FormatDateTime(dt, DateFormat.ShortDate)
dayofweeks = dt.DayOfWeek
dateString = dt
dateString = Trim(dateString)
dateString is a short date that has #1/1/2014#
when it is stored in access which the field is set to short date it appears as 1/1/2014
when I query I get message mismatch in query.
how do I trim off the # signs from dateString.
tried dateString = dateString.trim(#) comes back as trim is not a method of date
query line reads:
Dim DaD2 As OleDbDataAdapter = New OleDbDataAdapter("Select * from EmployeeAccumInfo where WORKDATE = '" & dateString & " ' ", Con)
WORKDATE in this case is would be 1/1/2014 and dateString is #1/1/2014#