[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Format

Posted on 2011-02-28
6
Medium Priority
?
283 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 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 Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

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…
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
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.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

868 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