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
Solved

Format

Posted on 2011-02-28
6
266 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
6 Comments
 
LVL 11

Assisted Solution

by:LambertHeenan
LambertHeenan earned 150 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 150 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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 

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 200 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

856 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