PC Review


Reply
Thread Tools Rate Thread

Custom date format shows "051117.Thu" for today. Way to have "051117.Th", instead?

 
 
StargateFan
Guest
Posts: n/a
 
      17th Nov 2005
With these standard abbreviations holding true for the entire week:

Mon = s/b Mn
Tue = s/b Tu
Wed = s/b Wd
Thu = s/b Th
Fri = s/b Fr
Sat = s/b Sa
Sun = s/b Sn

?

Hope it's possible. I have code that does something similar elsewhere
in XL2K, but nothing I've tried in converting it to this particular
spreadsheet's use, works. Thanks so much. D

 
Reply With Quote
 
 
 
 
Niek Otten
Guest
Posts: n/a
 
      17th Nov 2005
I don't think you can do it with a format. You can use a formula:

=TEXT(A1,"yymmdd.")&LEFT(TEXT(A1,"ddd"),2)

--
Kind regards,

Niek Otten

"StargateFan" <IDon'tAcceptSpam@IDon'tAcceptSpam.com> wrote in message
news:(E-Mail Removed)...
> With these standard abbreviations holding true for the entire week:
>
> Mon = s/b Mn
> Tue = s/b Tu
> Wed = s/b Wd
> Thu = s/b Th
> Fri = s/b Fr
> Sat = s/b Sa
> Sun = s/b Sn
>
> ?
>
> Hope it's possible. I have code that does something similar elsewhere
> in XL2K, but nothing I've tried in converting it to this particular
> spreadsheet's use, works. Thanks so much. D
>



 
Reply With Quote
 
StargateFanFromWork
Guest
Posts: n/a
 
      17th Nov 2005
"Niek Otten" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I don't think you can do it with a format. You can use a formula:
>
> =TEXT(A1,"yymmdd.")&LEFT(TEXT(A1,"ddd"),2)


That is so cool, it doesn't automatically use my format though (i.e., Mn for
Mon, Sn for Sun, Wd for Weds., etc.) but just seems to take off the last
letter. I didn't want to confuse the issue in my initial message so didn't
copy the code I was trying to emulate in this new spreadsheet. Perhaps I
should have. But I can't find a copy of that particular spreadsheet here at
the office and only have a copy at home. But hoping you know what I mean re
the the day style from the list of day formats below.

Also, the difficulty is that you're right, it was in the formula that this
is affected. That was why I couldn't figure out how to modify that existing
code to what I need in this new situation. No wonder I was having such
trouble. The formulas involved are so completely different! <g>

In this new spreadsheet, each cell already has a formula which all look
pretty much like this:

=IF(B2<>"",B2+1,"")

It's quite a large spreadsheet actually, and all the affected fields are
populated based on the user input in the 2 first cells. So the requirement
is to have in adjacent cells the format of yyyymmdd.ddd, where ddd returns
the 2-character format as listed below. Sorry it's so specific, but that's
what they use here manually so would like to not confuse the users in their
electronic versions.

Thanks and appreciate any further help in fixing this. You're all so very
kind to help us "darned newbies"! <g>

> --
> Kind regards,
>
> Niek Otten
>
> "StargateFan" <IDon'tAcceptSpam@IDon'tAcceptSpam.com> wrote in message
> news:(E-Mail Removed)...
> > With these standard abbreviations holding true for the entire week:
> >
> > Mon = s/b Mn
> > Tue = s/b Tu
> > Wed = s/b Wd
> > Thu = s/b Th
> > Fri = s/b Fr
> > Sat = s/b Sa
> > Sun = s/b Sn
> >
> > ?
> >
> > Hope it's possible. I have code that does something similar elsewhere
> > in XL2K, but nothing I've tried in converting it to this particular
> > spreadsheet's use, works. Thanks so much. D
> >

>
>



 
Reply With Quote
 
Ron Rosenfeld
Guest
Posts: n/a
 
      17th Nov 2005
On Thu, 17 Nov 2005 08:37:56 -0500, StargateFan
<IDon'tAcceptSpam@IDon'tAcceptSpam.com> wrote:

>With these standard abbreviations holding true for the entire week:
>
>Mon = s/b Mn
>Tue = s/b Tu
>Wed = s/b Wd
>Thu = s/b Th
>Fri = s/b Fr
>Sat = s/b Sa
>Sun = s/b Sn
>
>?
>
>Hope it's possible. I have code that does something similar elsewhere
>in XL2K, but nothing I've tried in converting it to this particular
>spreadsheet's use, works. Thanks so much. D


If you want to use the cell contents in other calculations, it will not be
possible without changing the subsequent formulas.

If you are only concerned that the results be displayed the way you show, then
you can convert the date to a text string. With the date in A1:

=TEXT(A1,"yymmdd.")& CHOOSE(WEEKDAY(A1),"Sn","Mn","Tu","Wd","Th","Fr","Sa")


--ron
 
Reply With Quote
 
Niek Otten
Guest
Posts: n/a
 
      17th Nov 2005
That can easily be achieved with a VLOOKUP() function;
=TEXT(A1,"yymmdd.")&VLOOKUP(TEXT(A1,"ddd"),{"Mon","Mn";"Tue","Tu";"Wed","Wd";"Thu","Th";"Fri","Fr";"Sat","Sa";"Sun","Sn"},2,FALSE)

--
Kind regards,

Niek Otten

"StargateFanFromWork" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "Niek Otten" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> I don't think you can do it with a format. You can use a formula:
>>
>> =TEXT(A1,"yymmdd.")&LEFT(TEXT(A1,"ddd"),2)

>
> That is so cool, it doesn't automatically use my format though (i.e., Mn
> for
> Mon, Sn for Sun, Wd for Weds., etc.) but just seems to take off the last
> letter. I didn't want to confuse the issue in my initial message so
> didn't
> copy the code I was trying to emulate in this new spreadsheet. Perhaps I
> should have. But I can't find a copy of that particular spreadsheet here
> at
> the office and only have a copy at home. But hoping you know what I mean
> re
> the the day style from the list of day formats below.
>
> Also, the difficulty is that you're right, it was in the formula that this
> is affected. That was why I couldn't figure out how to modify that
> existing
> code to what I need in this new situation. No wonder I was having such
> trouble. The formulas involved are so completely different! <g>
>
> In this new spreadsheet, each cell already has a formula which all look
> pretty much like this:
>
> =IF(B2<>"",B2+1,"")
>
> It's quite a large spreadsheet actually, and all the affected fields are
> populated based on the user input in the 2 first cells. So the
> requirement
> is to have in adjacent cells the format of yyyymmdd.ddd, where ddd returns
> the 2-character format as listed below. Sorry it's so specific, but
> that's
> what they use here manually so would like to not confuse the users in
> their
> electronic versions.
>
> Thanks and appreciate any further help in fixing this. You're all so very
> kind to help us "darned newbies"! <g>
>
>> --
>> Kind regards,
>>
>> Niek Otten
>>
>> "StargateFan" <IDon'tAcceptSpam@IDon'tAcceptSpam.com> wrote in message
>> news:(E-Mail Removed)...
>> > With these standard abbreviations holding true for the entire week:
>> >
>> > Mon = s/b Mn
>> > Tue = s/b Tu
>> > Wed = s/b Wd
>> > Thu = s/b Th
>> > Fri = s/b Fr
>> > Sat = s/b Sa
>> > Sun = s/b Sn
>> >
>> > ?
>> >
>> > Hope it's possible. I have code that does something similar elsewhere
>> > in XL2K, but nothing I've tried in converting it to this particular
>> > spreadsheet's use, works. Thanks so much. D
>> >

>>
>>

>
>



 
Reply With Quote
 
Niek Otten
Guest
Posts: n/a
 
      17th Nov 2005
Ron's solutions is simpler thus better.

--
Kind regards,

Niek Otten

"Niek Otten" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> That can easily be achieved with a VLOOKUP() function;
> =TEXT(A1,"yymmdd.")&VLOOKUP(TEXT(A1,"ddd"),{"Mon","Mn";"Tue","Tu";"Wed","Wd";"Thu","Th";"Fri","Fr";"Sat","Sa";"Sun","Sn"},2,FALSE)
>
> --
> Kind regards,
>
> Niek Otten
>
> "StargateFanFromWork" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> "Niek Otten" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> I don't think you can do it with a format. You can use a formula:
>>>
>>> =TEXT(A1,"yymmdd.")&LEFT(TEXT(A1,"ddd"),2)

>>
>> That is so cool, it doesn't automatically use my format though (i.e., Mn
>> for
>> Mon, Sn for Sun, Wd for Weds., etc.) but just seems to take off the last
>> letter. I didn't want to confuse the issue in my initial message so
>> didn't
>> copy the code I was trying to emulate in this new spreadsheet. Perhaps I
>> should have. But I can't find a copy of that particular spreadsheet here
>> at
>> the office and only have a copy at home. But hoping you know what I mean
>> re
>> the the day style from the list of day formats below.
>>
>> Also, the difficulty is that you're right, it was in the formula that
>> this
>> is affected. That was why I couldn't figure out how to modify that
>> existing
>> code to what I need in this new situation. No wonder I was having such
>> trouble. The formulas involved are so completely different! <g>
>>
>> In this new spreadsheet, each cell already has a formula which all look
>> pretty much like this:
>>
>> =IF(B2<>"",B2+1,"")
>>
>> It's quite a large spreadsheet actually, and all the affected fields are
>> populated based on the user input in the 2 first cells. So the
>> requirement
>> is to have in adjacent cells the format of yyyymmdd.ddd, where ddd
>> returns
>> the 2-character format as listed below. Sorry it's so specific, but
>> that's
>> what they use here manually so would like to not confuse the users in
>> their
>> electronic versions.
>>
>> Thanks and appreciate any further help in fixing this. You're all so
>> very
>> kind to help us "darned newbies"! <g>
>>
>>> --
>>> Kind regards,
>>>
>>> Niek Otten
>>>
>>> "StargateFan" <IDon'tAcceptSpam@IDon'tAcceptSpam.com> wrote in message
>>> news:(E-Mail Removed)...
>>> > With these standard abbreviations holding true for the entire week:
>>> >
>>> > Mon = s/b Mn
>>> > Tue = s/b Tu
>>> > Wed = s/b Wd
>>> > Thu = s/b Th
>>> > Fri = s/b Fr
>>> > Sat = s/b Sa
>>> > Sun = s/b Sn
>>> >
>>> > ?
>>> >
>>> > Hope it's possible. I have code that does something similar elsewhere
>>> > in XL2K, but nothing I've tried in converting it to this particular
>>> > spreadsheet's use, works. Thanks so much. D
>>> >
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
StargateFanFromWork
Guest
Posts: n/a
 
      17th Nov 2005

"Ron Rosenfeld" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Thu, 17 Nov 2005 08:37:56 -0500, StargateFan
> <IDon'tAcceptSpam@IDon'tAcceptSpam.com> wrote:
>
> >With these standard abbreviations holding true for the entire week:
> >
> >Mon = s/b Mn
> >Tue = s/b Tu
> >Wed = s/b Wd
> >Thu = s/b Th
> >Fri = s/b Fr
> >Sat = s/b Sa
> >Sun = s/b Sn
> >
> >?
> >
> >Hope it's possible. I have code that does something similar elsewhere
> >in XL2K, but nothing I've tried in converting it to this particular
> >spreadsheet's use, works. Thanks so much. D

>
> If you want to use the cell contents in other calculations, it will not be
> possible without changing the subsequent formulas.


Yes, that makes sense and is why I later wrote what the code was. Again,
wasn't conscious that the display was governed by the formula. I mean, I
was seeing it, but not realizing that as it had been such a long time since
this concept was presented to me and knew less about XL2K than I do now
(yes, I _do_ know a little bit more than then <g>).

That's what I'm having trouble doing, though. I don't know why VB is so
difficult sometimes for me to try to work with, but it is.

As I originally stated, I need the exact 2-character display above for the
days, and the formula involved to achieve the dates in all the cells looks
like this:

=IF(B2<>"",B2+1,"")

How can I show the format in a customized yyyymmdd.ddd in that formula,
where ddd returns the above 2-character date format?




That's what I've been needing all along; it seems I just didn't explain it
properly.




Thanks so much. D

> If you are only concerned that the results be displayed the way you show,

then
> you can convert the date to a text string. With the date in A1:
>
> =TEXT(A1,"yymmdd.")&

CHOOSE(WEEKDAY(A1),"Sn","Mn","Tu","Wd","Th","Fr","Sa")
>
>
> --ron



 
Reply With Quote
 
Ron Rosenfeld
Guest
Posts: n/a
 
      17th Nov 2005
On Thu, 17 Nov 2005 14:56:40 -0500, "StargateFanFromWork"
<(E-Mail Removed)> wrote:

>As I originally stated, I need the exact 2-character display above for the
>days, and the formula involved to achieve the dates in all the cells looks
>like this:
>
>=IF(B2<>"",B2+1,"")
>
>How can I show the format in a customized yyyymmdd.ddd in that formula,
>where ddd returns the above 2-character date format?


Well, you've got to extract the part of the string that represents the date,
add one to it, and then convert it back into the format you're interested in.

Here is a worksheet formula equivalent to your IF function above with the
conversions embedded in it:

You could enter this in B3 and copy/drag it down.

=IF(B2="","",TEXT(DATE(1900+LEFT(B2,2)+100*(--LEFT(B2,2)<30),
MID(B2,3,2),MID(B2,5,2)+1),"yymmdd.")&CHOOSE(WEEKDAY(DATE(
1900+LEFT(B2,2)+100*(--LEFT(B2,2)<30),MID(B2,3,2),MID(B2,5,2)+1)),
"Sn","Mn","Tu","Wd","Th","Fr","Sa"))

Obviously, a lot more complicated.


--ron
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Create a subfolder using today's date" format, Camera ConnectedEvent jbreslowsubs@gmail.com Windows XP Configuration 1 30th Apr 2009 03:53 PM
Converting "yyyymmdd" date string into "dd monthname yyyy" format stainless Microsoft C# .NET 2 31st Jan 2008 06:28 PM
Outlook 2003 does not display "Last Month", "Last Week", "Today" e =?Utf-8?B?QW5pdGFfUGZh?= Microsoft Outlook Discussion 2 29th Oct 2007 06:51 AM
How do I show "Today" and "Yesterday" in my Date view? =?Utf-8?B?UGtiYXNl?= Microsoft Outlook Discussion 1 2nd Jul 2007 05:47 AM
Outlooks 2003 Inbox "Today", .. "Yesterday"..., "Last week".. etc... Pab Microsoft Outlook Discussion 2 25th Apr 2004 03:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:57 AM.