Solved

format a date returned from a dlookup

Posted on 2012-03-20
4
375 Views
Last Modified: 2012-03-20
Is there a way to format a date that was returned from a dlookup?

For example: I tried this:

myformatteddate = Format(Dlookup("[dateinv]", "tbldefaults","mmmm, yyyy"))

but that produces an error.

Thanks.
0
Comment
Question by:BauwensER
[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
4 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 37742841
Nearly..

myformatteddate = Format(Dlookup("[dateinv]", "tbldefaults"),"mmmm, yyyy")
0
 
LVL 6

Accepted Solution

by:
wshark83 earned 500 total points
ID: 37742864
what's the error message? can you provide an example file?

Try:

format(DLookup("dateinv", "tbldefaults"),"mmm/yyyy")
0
 

Author Comment

by:BauwensER
ID: 37743068
This works, my mistake sorry
0
 
LVL 77

Expert Comment

by:peter57r
ID: 37743260
You don't have to change anything now, but it is convention to accept the First correct answer to be posted.
0

Featured Post

Industry Leaders: 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

Suggested Solutions

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
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…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

752 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