[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Format

Posted on 2011-02-28
6
Medium Priority
?
280 Views
Last Modified: 2012-06-27
Experts, how would I format this for mmmm yyyy?

Dates: IIf(IsNull([tblLetterOfCredit].[LatestShipDate]),"Final Maturity","Latest Ship Date")
thank you
0
Comment
Question by:pdvsa
[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
6 Comments
 
LVL 11

Assisted Solution

by:LambertHeenan
LambertHeenan earned 600 total points
ID: 34999656
The expression you quote does not return a date of any sort.

What it does as written is say that if LatestShipDate is null then return the string "Final Maturity" otherwise return the string "Latest Ship Date".

If Final Maturity and Latest Ship Date are in fact the names of the date fields you actually want to return then modify the Iff expression to this...

IIf(IsNull([tblLetterOfCredit].[LatestShipDate]),[Final Maturity],[Latest Ship Date])

Then to get the format you want you would wrap the whole thing in a Format() statment...

Format(
IIf(IsNull([tblLetterOfCredit].[LatestShipDate]),[Final Maturity],[Latest Ship Date]),"mmmm yyyy")

0
 
LVL 40

Assisted Solution

by:als315
als315 earned 600 total points
ID: 34999672
Your question is not clear. You can format date as mmmm yyyy, but result of your iif is text. You can add date value in this format to the "Latest ship date" as:
IIf(IsNull([tblLetterOfCredit].[LatestShipDate]),"Final Maturity","Latest Ship Date: " & Format([tblLetterOfCredit].[LatestShipDate],"mmmm yyyy"))
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34999683

Dates: IIf(IsNull([tblLetterOfCredit].[LatestShipDate]),"Final Maturity",Format([LatestShipDate],"mmmm yyyy")
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:pdvsa
ID: 34999904

I see it was text.

How to format the [tblLetterOfCredit].[FinalMaturity] as mmmm yyyy just as the ([tblTransactions.LatestShipDate] is formatted as mmmm yyyy (dont pay attn to previous as it has changed):

Dates: IIf(IsNull([tblTransactions].[LatestShipDate]),[tblLetterOfCredit].[FinalMaturity],Format([tblTransactions.LatestShipDate],"mmmm yyyy"))
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 800 total points
ID: 34999955


Dates: IIf(IsNull([tblTransactions].[LatestShipDate]),Format([tblLetterOfCredit].[FinalMaturity],"mmmm yyyy"), Format([tblTransactions.LatestShipDate],"mmmm yyyy"))
0
 

Author Closing Comment

by:pdvsa
ID: 35000124
i agree My descrip of qstn was a little unclear
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

650 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