Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems concerning dates ! 2

Status
Not open for further replies.

Joanne

Programmer
Mar 7, 2000
3
GB
Can anyone help<br>
I am new to Visual Basic.I am designing a database for my client for their reports. Data will be downloaded from SAP system into linked tables within access 2000. <br>
dates will be downloaded as &quot;yyyymmdd&quot; and not in any kind of date /time format. I need to tell access to pull off a monthly report using this format. All my text books indicate that the field should be in date/time format.I want to be able to put in VB within a parameter query so that access understands the date.<br>
I am at my wits end<br>
Please help!
 
try this<br>
where Date1 is your date yyyymmdd<br>
<br>
Public Function ConvertDate(Date1) As Date<br>
Dim MyDate As String<br>
MyDate = Trim(Str(Date1))<br>
ConvertDate = DateSerial(Left(MyDate, 4), Mid(MyDate, 5, 2), Right(MyDate, 2))<br>
End Function<br>
<p> DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br>
 
Thanks DougP<br>
You have saved my Life<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top