?
Solved

Covert a DATE/TIME to string value in VBA

Posted on 2005-03-08
3
Medium Priority
?
703 Views
Last Modified: 2008-02-01
For the Life of me I cant find a function to convert a DATE/TIME field to a String

Im sure I can you a datepart function but that would be ugly.

But does VBA have a Function to change a standard access date/time to a String?
I know they have the opposite datevalue(September 15, 2005) to 9/15/05

Thanks for the Help!

Joe V
0
Comment
Question by:joein610
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 11

Expert Comment

by:Stephen_Perrett
ID: 13485361
format(Now,"dd/mm/yy")
steve
0
 
LVL 9

Accepted Solution

by:
Bat17 earned 1000 total points
ID: 13485370
Use the format function
format(#1/15/05#,"DD/MM/YYYY") or
format(Date(),"DD/MM/YYYY")

HTH

Peter
0
 
LVL 11

Expert Comment

by:Stephen_Perrett
ID: 13485382
You can create any format you want  e.g. "mmmm d, yyyy"
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question