Solved

Format

Posted on 2011-02-28
6
255 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 39

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 119

Expert Comment

by:Rey Obrero
ID: 34999683

Dates: IIf(IsNull([tblLetterOfCredit].[LatestShipDate]),"Final Maturity",Format([LatestShipDate],"mmmm yyyy")
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

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 119

Accepted Solution

by:
Rey Obrero 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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now