Change dates to a custom format via formula ... how to?

Hello,

A2 has formula =NOW()
which makes date today in this format:
Tue.Apr.26.2011

How can I get my custom date formats so that the above date shows up
as Tu.Apr.26.2011.

In another sheet, I was kindly given this to make these types of
changes:
=IF($A$2<>"",TEXT($A$2,"yymmdd.")&CHOOSE(WEEKDAY($A$2),"Sn","Mn","Tu","Wd","Th","Fr","Sa"),"")

I tried this,
=NOW()&CHOOSE(WEEKDAY($A$2),"Sn","Mn","Tu","Wd","Th","Fr","Sa"), but
that didn't work <g>, not that I thought it would.  But was wondering
how I can do this for this workbook and others in future.

Thanx!  :oD

0
4/26/2011 5:47:29 PM
excel 39879 articles. 2 followers. Follow

5 Replies
949 Views

Similar Articles

[PageSpeed] 7

On Tue, 26 Apr 2011 13:47:29 -0400, StargateFan <IDon'tAcceptSpam@NoJunkMail.com> wrote:

>Hello,
>
>A2 has formula =NOW()
>which makes date today in this format:
>Tue.Apr.26.2011
>
>How can I get my custom date formats so that the above date shows up
>as Tu.Apr.26.2011.
>
>In another sheet, I was kindly given this to make these types of
>changes:
>=IF($A$2<>"",TEXT($A$2,"yymmdd.")&CHOOSE(WEEKDAY($A$2),"Sn","Mn","Tu","Wd","Th","Fr","Sa"),"")
>
>I tried this,
>=NOW()&CHOOSE(WEEKDAY($A$2),"Sn","Mn","Tu","Wd","Th","Fr","Sa"), but
>that didn't work <g>, not that I thought it would.  But was wondering
>how I can do this for this workbook and others in future.
>
>Thanx!  :oD

If you always want to print out today's date:

=CHOOSE(WEEKDAY(TODAY()),"Sn","Mn","Tu","Wd","Th","Fr","Sa") & TEXT(TODAY(),"\.mmm.dd.yyyy")

Note that I use TODAY() instead of NOW() as NOW() also includes the time of day, which is unneccessary in this formula.

If you want to print out the data that is in A2, then merely substitute A2 for TODAY() in the above formula:

=CHOOSE(WEEKDAY(A2),"Sn","Mn","Tu","Wd","Th","Fr","Sa") & TEXT(A2,"\.mmm.dd.yyyy")

And if you want to print a blank if A2 is empty, nest the above into an IF statement:

=IF(A2="","",CHOOSE(WEEKDAY(A2),"Sn","Mn","Tu","Wd","Th","Fr","Sa") & TEXT(A2,"\.mmm.dd.yyyy"))

or, better to test if there is a number in A2 since dates are stored as numbers.  This would also print a blank, instead of an error, if A2 is text or error.

=IF(ISNUMBER(A2),CHOOSE(WEEKDAY(A2),"Sn","Mn","Tu","Wd","Th","Fr","Sa") & TEXT(A2,"\.mmm.dd.yyyy"),"")
0
ron6368 (329)
4/26/2011 6:10:03 PM
> A2 has formula =NOW()
> which makes date today in this format:
> Tue.Apr.26.2011
>
> How can I get my custom date formats so that the above date
> shows up as Tu.Apr.26.2011.

Here is a formula for you to try...

=MID("SnMnTuWdThFrSa",2*WEEKDAY(TODAY())-1,2)&TEXT(TODAY(), "\.mmm.dd.yyyy")

Rick Rothstein (MVP - Excel) 

0
4/26/2011 6:43:20 PM
On Tue, 26 Apr 2011 14:10:03 -0400, Ron Rosenfeld <ron@nospam.net>
wrote:

>On Tue, 26 Apr 2011 13:47:29 -0400, StargateFan <IDon'tAcceptSpam@NoJunkMail.com> wrote:
>
>>Hello,
>>
>>A2 has formula =NOW()
>>which makes date today in this format:
>>Tue.Apr.26.2011
>>
>>How can I get my custom date formats so that the above date shows up
>>as Tu.Apr.26.2011.
>>
>>In another sheet, I was kindly given this to make these types of
>>changes:
>>=IF($A$2<>"",TEXT($A$2,"yymmdd.")&CHOOSE(WEEKDAY($A$2),"Sn","Mn","Tu","Wd","Th","Fr","Sa"),"")
>>
>>I tried this,
>>=NOW()&CHOOSE(WEEKDAY($A$2),"Sn","Mn","Tu","Wd","Th","Fr","Sa"), but
>>that didn't work <g>, not that I thought it would.  But was wondering
>>how I can do this for this workbook and others in future.
>>
>>Thanx!  :oD
>
>If you always want to print out today's date:
>
>=CHOOSE(WEEKDAY(TODAY()),"Sn","Mn","Tu","Wd","Th","Fr","Sa") & TEXT(TODAY(),"\.mmm.dd.yyyy")
>
>Note that I use TODAY() instead of NOW() as NOW() also includes the time of day, which is unneccessary in this formula.
>
>If you want to print out the data that is in A2, then merely substitute A2 for TODAY() in the above formula:
>
>=CHOOSE(WEEKDAY(A2),"Sn","Mn","Tu","Wd","Th","Fr","Sa") & TEXT(A2,"\.mmm.dd.yyyy")
>
>And if you want to print a blank if A2 is empty, nest the above into an IF statement:
>
>=IF(A2="","",CHOOSE(WEEKDAY(A2),"Sn","Mn","Tu","Wd","Th","Fr","Sa") & TEXT(A2,"\.mmm.dd.yyyy"))
>
>or, better to test if there is a number in A2 since dates are stored as numbers.  This would also print a blank, instead of an error, if A2 is text or error.
>
>=IF(ISNUMBER(A2),CHOOSE(WEEKDAY(A2),"Sn","Mn","Tu","Wd","Th","Fr","Sa") & TEXT(A2,"\.mmm.dd.yyyy"),"")

Awesome, thank you for so many options.  I use this short date format
all the time so it's neat to know how to display it now.

Thx.

0
4/28/2011 2:17:30 PM
On Tue, 26 Apr 2011 14:43:20 -0400, "Rick Rothstein"
<rick.newsNO.SPAM@NO.SPAMverizon.net> wrote:

>> A2 has formula =NOW()
>> which makes date today in this format:
>> Tue.Apr.26.2011
>>
>> How can I get my custom date formats so that the above date
>> shows up as Tu.Apr.26.2011.
>
>Here is a formula for you to try...
>
>=MID("SnMnTuWdThFrSa",2*WEEKDAY(TODAY())-1,2)&TEXT(TODAY(), "\.mmm.dd.yyyy")
>
>Rick Rothstein (MVP - Excel) 

Thank you!  This worked wonderfully.  I didn't which code to choose so
I created a copy of the worksheet and put your code in one and Ron
Rosenfeld's in the other.  That gives me two options to fall back on
when I re-use this code again in future. In the meantime, this does
the current job just great.  Thx.

0
4/28/2011 2:20:05 PM
On Thu, 28 Apr 2011 10:17:30 -0400, StargateFan <IDon'tAcceptSpam@NoJunkMail.com> wrote:

>Awesome, thank you for so many options.  I use this short date format
>all the time so it's neat to know how to display it now.
>
>Thx.

Glad to help.  Thanks for the feedback.
0
ron6368 (329)
4/29/2011 12:12:53 AM
Reply:

Similar Artilces:

External data link change
Hi, I've a sheet linked to an external data on the net, and I would like that a cell in this sheet to indicate the last date and time it was updated, the simplest way the better but I can do some programming too. Thanks for your attention, -- Domingos Junqueira No need of help any more, I solved the question. Thanks again ...

Why does the change change to a number?
Hi all, I've noticed something wierd and always wondered WHY it happens. When you type a date into a cell, and then change the Formatting of it to a 'general' cell, it turns into a number. How does it come up with that number? What is the significance? i.e. type today's date of "12/7/2007" - change it to a 'General' format, and it then says "39423". I'm a trainer of Excel and this question always comes up. I'm curious myself too. Thanks! Joe It's the number of days since January zero 1900 using Excel default for windows (M...

automatically insert current date
Hello Group, I'm trying to create a Fax template in which the date field will automatically fill in with the current date. I've downloaded some of the MS templates which will do this, but I have no way of knowing or seeing what code is in that field. If I'm doing a template on my own, how to I get the date to update to current one automatically? Many thanks. Jack The application you are using is? JClark wrote: > Hello Group, > > I'm trying to create a Fax template in which the date field will > automatically fill in with the current date....

changing the way Excel displays selected cells
Is there a way to change the way Excel displays selected cells? I'm interested in viewing all the selected cells highlighted (with light blue for instance), but by default excel highlights all the cells but not the first one the same occurs when you define a range with no adyacents cells Your definition of the display is not quite correct. Excel highlights the current cell, Excel also highlights a selecte range. The currently selected cell is generally the first of a range, bu press enter and the current cell changes and becomes the second, the third etc in the range. You cannot...

Track Changes
How do i remove the track changes in outlook? When i press "Enter", a symbol that represents "Enter" will appears. Same for space etc. ...

DST changes for Exchange 5.5
I noticed the 2007 DST Calendar Update "Exchange tool" is available now: http://support.microsoft.com/kb/930879 This will seemingly take care of calendars for mailboxes still on Exchange 5.5 servers, as Exchange 5.5 is listed as "compatible" . However would this address the CDO issues such as BlackBerry users and OWA users still on Exchange 5.5 ? Thanks in advance, Itrcb4 On Mon, 12 Feb 2007 14:31:00 -0800, itrcb4 <itrcb4@discussions.microsoft.com> wrote: >I noticed the 2007 DST Calendar Update "Exchange tool" is available now: > >http://su...

Can't Publish changes with Deploy Manager
After a migration process, I can't publish the changes made on CRM. When I try do this in Deploy Manager I get the follow error: ---------------------------------------------------------------------------- ----- Publish done with errors. See the event log to get deitails NETRA-INOVACAO: ***Error*** Failed to download XSL template files from Web Server ---------------------------------------------------------------------------- ----- Can somebody help me? I don't know if the migration process have any relationship with the error. Thank you for pay attention. []'s Vin´┐Żcius Pitta...

enterprise custom field for overdue tasks
I'm trying to create a view that shows overdue tasks and am having some trouble. I went into enterprise custom fields and tried to create a new Task > Date field with the following formula :IIf([Finish]<[Current Date] And [% Complete]<100,"red","green"). Now I would expect it to populate that field with either "red" or "green" depending on if it meets the criteria. Furthermore I would like to use graphical indicators to show red or green stoplights. However, I cannot get this formula to work - When I add the new field to a ...

Hidden rows unhide themselves when formulas are written
I have a worksheet with many hidden rows & columns. However, when I try to write a formula in this worksheet, these hidden rows & columns automatically unhide themselves. Is there any way to disable this? ...

more on VBA function name change
I thought I'd start a new thread since I haven't received any replies to my first one... To recap: I've declared a function in a module using mixed case: Function TMDE_Category (FormName As Form) I noticed recently that it appeared in the module as Function tmde_category(FormName As Form) I changed it back to the mixed case declaration, saved the module, exited the app, reopened it and looked. The function had changed back to the all lowercase declaration. Things I've tried since the original post: Using the databse documenter, I selected all ob...

Convert dates stored as text
I have Excel 2007 in English, but I sometimes receive data that comes from another applicationes, so dates are stored as text because they come in following format: dd/mm/yyyy. And I have the format mm/dd/yyyy. So, in the same column, I have dates stored as dates, and dates stored as text. Which is the easiest way to convert them all to date format? Thanks in advance. Regards, Emece.- Be careful. I'd bet that those values that come in as real dates aren't what the original data represent. For instance, if you have two values: 25/12/2010 and 01/02/2010 The...

Filter contact records by customer type code in views
In version 1.2 I had set up several views of contact records by customer type code. In 3.0 this field cannot be selected as filtering criteria. While the views I had set up in 1.2 work, that cannot be changed. Is there a reason this field is no longer avialable under 3.0? This field is listed attribute. Is there a way to may it appear? Thanks for any help you can give. Brand Microsoft CRM Support maybe of help with this one, try submiting a incident for this. Good luck. Frank Lee Workopia, Inc. www.workopia.com "Brand" wrote: > In version 1.2 I had set up several v...

Updating Contacts via Email
Can anyone recommend software that will send info update requests to everyone in my contacts folder and integrate their replies automatically? I found a program called Contacts Clinic, but I can't find any sort of review of it. Does it work? Is there a better alternative? I'm not looking forward to the prospect of calling every number in there to update manually. ...

How to change icon for my application
Hi, I am currently developing an application on visual studio 6.0, and i wish to change the MFC icon on my application header. Anyone can help? Thank you. Raed Sawalha wrote: > Hi, I am currently developing an application on visual studio 6.0, and i > wish to change the MFC icon on my application header. Anyone can help? Thank > you. > > Open the icon resource for editing by double clicking. Then notice the control just above the editing grid that lets you switch between editing the large icon and editing the small one. -- Scott McPhillips [VC++ MVP] thanx that work...

Average formula #6
What formula do I use to calculate a weekly average as the monthly tota changes? Example: july total value divided by 28weeks, august value divided b 32 weeks, sept value divided by 36 weeks and so on In other words, a weekly average as each month ends and the value i entered I hope someone understands this and can help thanks so much lesli -- onyx481 ----------------------------------------------------------------------- onyx4813's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2630 View this thread: http://www.excelforum.com/showthread.php?threadid=47137 As...

How to change newsgroup message font
Like many other ribbon based programs I sometimes struggle to find how to make a change. This time its how to change the font just for newsgroup messages? regards "nobody" wrote in message news:EWTao.39493$GF5.7129@hurricane... > Like many other ribbon based programs I sometimes struggle to find how to make a change. This time its how to change the font just for newsgroup messages? Newsgroup messages are usually plain text. The font used is that selected at [no name tab] > Options > Mail > Read > Fonts for the encoding specified for the messag...

Notify change of email address when changing ISP
How do I notify my entire address book of an email address when I change ISP's? Thanks By sending a mail to everyone ? If you do so, please use BCC for the adresses, this way you won't spread everybody's e-mail adres to everybody. Niels Bob Baker wrote: > How do I notify my entire address book of an email address when I change ISP's? > Thanks ...

Paying a vendor that is also a customer
I have a customer that I sometimes buy materials from. How can I show a deduction from an invoice as payment for materials. Or is this not possible in Money because it is an income and expense in the same transaction? ...

Removing a custom Toolbar Button & macro
I've put macro in module, then make a custom button on the toolbar to invoke a macro.(according to excel help) -------------------------------------- Create a toolbar button that runs your macro 1. On the Tools menu, click Customize, and then click the Commands tab. 2. Under Categories, click Macros. 3. Drag the custom button to the toolbar where you want it. 4. On the Customize dialog box, click Modify Selection, and then click Assign Macro. 5. In the Assign Macro dialog box, click the nam...

Count the cels with the same collor made with conditional formatting!
Hi all, Who nows how i can count the collor cels (red-green-yellow) in my worksheet! I'm using conditional formating to collor them. I need the sum of all cels with the same color to put them in a chart. Thanks! Greetz, Jan ;-)) Hi Jan have a look at this previous discussion http://tinyurl.com/3xr9b -- Regards Frank Kabel Frankfurt, Germany Freesurfer wrote: > Hi all, > > Who nows how i can count the collor cels (red-green-yellow) in my > worksheet! I'm using conditional formating to collor them. > I need the sum of all cels with the same color to put them in a ...

Change a formula to an acual number
I want to change the formula I have created to the number it has created Example: Cell A1 is the number 1. Cell A2 is the formula =a1+1 creatin the number 2. I want this to be a two not a formula. Any ideas? Laura, copy, then paste special, valves -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2000 & 97 ** remove news from my email address to reply by email ** "Laura" <anonymous@discussions.microsoft.com> wrote in message news...

Problem Changing an Investment Name
I am trying to change an investment name and Money 2006 tells me "The name or symbol 'TRP Spectrum Income' has already been used for a deleted investment. Please enter a different name." When I go to delete investments the name does not appear! Any ideas on how I get Money to accept the name change? This is the first time I have run into this situation and I have made numerous name changes in Money over the years. In microsoft.public.money, Ken wrote: >I am trying to change an investment name and Money 2006 tells me "The name >or symbol 'TRP Spec...

Exporting a date field in Excel to an Outlook Calendar?
Is this possible? ...

Empty Custom Dynamic Dist. Group
Hi all, We are currently trying to finalize our Exchange 2007 deployment but have hit a few problems we can't figure out. The main problem is empty dynamic distribution groups (setup to use a custom filter) I run the following PS command; set-dynamicdistributiongroup -Identity 'AllStaff' -RecipientFilter {(Description -eq 'Staff User' -or Description -eq 'System Administrators')} The command completes without errors but there are no users in this distribution group when I view its members in OWA.. I have copied the msExchDynamicDLFilter property to ADUC Saved...

Should I change this code?
Should I change 556 to 560???..............Thanks for your help..........Bob Private Sub Command560_Click() On Error GoTo Err_Command556_Click Dim stDocName As String Dim stLinkCriteria As String stDocName = "frmClientInfomation" DoCmd.OpenForm stDocName, , , stLinkCriteria Exit_Command556_Click: Exit Sub Err_Command556_Click: MsgBox Err.Description Resume Exit_Command556_Click End Sub On Sun, 15 Jul 2007 16:37:26 +1200, "Bob V" <rjvance@ihug.co.nz> wrote: > >Should I change 556 to 560???..............Thanks for your help.....