Solved

Format

Posted on 2011-02-28
6
273 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 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
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!

 

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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

696 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