access vba dates
Microsoft Office TrainingThe UK's Number 1 for Microsoft Office Training Sitemap add this page to your favourites/bookmarksBookmark page
 
view a printable version of this pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Access VBA Training and help » Access VBA Dates

Access VBA Dates

resolvedResolved · Low Priority · Version 2003

replyReplyFri 19 Feb 2010, 15:28Delegate Claire said...

Access VBA Dates

When running a date limited analysis of our data we found that is we chose a date such as 7th Feb 1997 to 7th Feb 1997 (ie one days orders) we got results for 2nd July 1997 (ie American date format), however if you used a date outside the 12 months ie Feb 13th 1997 it would use the English dates and return the right data. How do we get round this.

PS Can I get a certificate for this course

For upcoming training course dates see: Pricing & availability

replyReplyTue 23 Feb 2010, 07:47Trainer Stephen said...

RE: Access VBA Dates

Hi Claire

Thanks for your question

This can be done by using a combination of datepart() functions, string cocatenation, and cdate functions to reorganise the date.
I will write a small procedure to solve this and will post it here later today or tommorrow

Regards

Stephen

replyReplyWed 3 Mar 2010, 16:13Trainer Stephen said...

RE: Access VBA Dates

Hi Claire

Sorry for the delay in responding.

I have created the following function which converts the date into UK format. It should be called from the on click procedure where the variable returned by the calendar control should be set as it's argument.

Public Function DateConverter(USDate As String) As Date

Dim strMonth As String
Dim strDay As String
Dim strYear As String
Dim strDate As String

strDay = DatePart("d", USDate)
strMonth = DatePart("m", USDate)
strYear = DatePart("yyyy", USDate)

strDate = strDay & "/" & strMonth & "/" & strYear

DateConverter = CDate(strDate)


End Function


Regards

Stephen

replyReplyMon 15 Mar 2010, 09:54Delegate Claire said...

RE: Access VBA Dates

Many thanks

I haven't had my certificate yet, can you advise?

 

 

Please browse our web site to find out more about
access/courses and other Microsoft training courses.

Access tip:

Modal forms

If you have created a form / switchboard and dont want people to get away from using the switchboard, you can change the form properites for Modal to On.

View all Access hints and tips

forum postWhat is first normal form?

» Forum post: Normalisation


Rate this page:
2.2/5 (213 votes cast)
Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses
Microsoft Certified Partner
Security Seal verified by visa, mastercard securecard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Management training

Professional Skills courses
Project Management Course London
Project Management Courses London
Project Management Training London
Project Management Training
Project Seminar
Project Seminars
Time Management Course London
Time Management London
Time Management Courses London
Time Management Training London
Introduction to Finance course
Assertiveness Skills course
Effective Communications Skills training
Presentation Skills London

Training Formats

Public scheduled courses
On-site training
Closed company courses

Consultancy
Application Development

Blogs

Excel Training
MS Project Training
Microsoft Training Blog

Version differences

Office 2010 vs 2007
MS Project version differences

Training Information

London Computer Training
Computer Training London
Docklands Training Courses
Docklands Training London

Training venues London
Client list
FAQ
Pricing and availability
Course details / Syllabus

Training Articles
Training Information

Microsoft training

Microsoft Office training
& IT Applications

Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training
MS Project courses
MS Project training
Outlook courses
PowerPoint courses
PowerPoint training
VBA courses
Word courses
Microsoft.training
(more...)

Excel Training

Excel courses
Excel Training Courses Medway
Autonumber in Excel
Microsoft Excel training
Basic Excel Courses
Basic Excel Course
Basic Excel Training

Interested in MS Access training?

Access courses
Microsoft Access training
Microsoft access courses
Microsoft training access course
Microsoft+access+training
Access courses in london

Training provider

Training providers
IT training companies
IT training providers
Management Training providers
Management Training provider

Event history, feedback results
Events in 2012 · 2011 · 2010 · More

See also

Crystal Reports training