Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Format text box, mmm ddd yyyy

Posted on 2011-03-12
13
Medium Priority
?
513 Views
Last Modified: 2012-05-11
Experts,

How do I format this:
=[Forms]![frmDateRange_Weekly].[txtdatefrom] & " - " & [Forms]![frmDateRange_Weekly].[txtDateTo]

as mmm dd yyyy

thanks
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
  • 4
  • 3
13 Comments
 
LVL 75
ID: 35117289
How about ...

=Format([Forms]![frmDateRange_Weekly].[txtdatefrom],"mmm dd yyyy") & " - " & Format([Forms]![frmDateRange_Weekly].[txtDateTo],"mmm dd yyyy")

mx
0
 

Author Comment

by:pdvsa
ID: 35117558
Mx:  I had to change the order of the ddd mmm but I dont seem to get the dates from the frmDateRange.  There are no mispellings.  

=Format([Forms]![frmDateRange].[txtdatefrom],"ddd mm yyyy") & " - " & Format([Forms]![frmDateRange].[txtDateTo],"ddd mm yyyy")

IN the attached screen print.   The one on the right is without any formatting.  The one on the left is with the formatting.  But you can see the dates are not correct between the two.  The one on the right is referencing the correct dates.  
untitled.JPG
0
 

Author Comment

by:pdvsa
ID: 35117565
Do you see anything wrong with the formatting of the above?  The only reason why the dates are different is because of the formatting on the left one.  
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 75
ID: 35117578
I see nothing wrong.  It simply looks as if the same date was put into txtDateFrom and txtDateTo ... ?
It is certainly working correctly in the Formatting sense.

mx
0
 

Author Comment

by:pdvsa
ID: 35117717
but this is not the case.  I copied and pasted that textbox.  The ONLY difference is the formatting.  

left one:
=Format([Forms]![frmDateRange].[txtdatefrom],"ddd mm yyyy") & " - " & Format([Forms]![frmDateRange].[txtDateTo],"ddd mm yyyy")

right one:
=[Forms]![frmDateRange].[txtdatefrom] & " - " & [Forms]![frmDateRange].[txtDateTo]


Do you see any issue here?  Maybe I am missing something.  I also tried single and double quotes.
0
 
LVL 75
ID: 35117785
Looks to me they are exactly the same (other than Format) ... beyond weird.


Capture1.gif
0
 

Author Comment

by:pdvsa
ID: 35117896
well fiddle sticks.  that is weird.  At least I am not crazy because I did the same thing you did to format it before I posted the question and did not work right.  Must be an answer to this.  Maybe corruption or something but I have compacted repaired and  compiled.  Oh well it will sort itself out.  Maybe I did something screwy somewhere.  
0
 
LVL 51

Accepted Solution

by:
Gustav Brock earned 2000 total points
ID: 35118001
Nothing wrong with the formats, but you have to make up your mind.
If you wish the day and not the month use this format:

"dddd dd yyyy"

/gustav
0
 

Author Comment

by:pdvsa
ID: 35118601
Ok.   Will test this when @ cmptr.  Thx
0
 
LVL 75
ID: 35118609
But how does that explain that the date is the same for the example that is Formatted ?

mx
0
 
LVL 51

Expert Comment

by:Gustav Brock
ID: 35120158
You omit the day, only displaying the weekday and month and year.
As the example dates are one week apart, they then look the same.

/gustav
0
 

Author Closing Comment

by:pdvsa
ID: 35122740
Gustav, it worked.  

the following did not even work for dates that were far apart and I dont completely understand why:
=Format([Forms]![frmDateRange].[txtdatefrom],"ddd mm yyyy") & " - " & Format([Forms]![frmDateRange].[txtDateTo],"ddd mm yyyy")

I believe you mentioned to use "dddd dd yyyy" for when dates are close together.  I have never heard of using that format order.  It is not logical.  Oh well at least I have what works.  Thank you.
0
 
LVL 51

Expert Comment

by:Gustav Brock
ID: 35122911
Well, the idea is that you can format a date to nearly whatever string expression you may wish.

/gustav
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
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 …

715 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