#1   Report Post  
Posted to microsoft.public.excel.misc
Hru48
 
Posts: n/a
Default date format


hey all,

I have worked out the first and last day of the month by using these
formulas

cell A1 is =NOW()
cell B1 is =DATE(YEAR(A1), MONTH(A1),1)
cell c1 is =DATE(YEAR(A1),MONTH(A1)+1,0)

and now I want the results of B1 and C1 in one cell which I thought I
could do with, cell D1 is =b1&" - "&c1

but everytime I try this I loose the date format in D1 and I can't get
it back.

Anyone got any ideas.

Cheers


--
Hru48
------------------------------------------------------------------------
Hru48's Profile: http://www.excelforum.com/member.php...o&userid=24895
View this thread: http://www.excelforum.com/showthread...hreadid=506733

  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default date format

=TEXT(B1,"dd/mm/yyyy")&" - "&TEXT(C1,"dd/mm/yyyy")

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Hru48" wrote in
message ...

hey all,

I have worked out the first and last day of the month by using these
formulas

cell A1 is =NOW()
cell B1 is =DATE(YEAR(A1), MONTH(A1),1)
cell c1 is =DATE(YEAR(A1),MONTH(A1)+1,0)

and now I want the results of B1 and C1 in one cell which I thought I
could do with, cell D1 is =b1&" - "&c1

but everytime I try this I loose the date format in D1 and I can't get
it back.

Anyone got any ideas.

Cheers


--
Hru48
------------------------------------------------------------------------
Hru48's Profile:

http://www.excelforum.com/member.php...o&userid=24895
View this thread: http://www.excelforum.com/showthread...hreadid=506733



  #3   Report Post  
Posted to microsoft.public.excel.misc
Kevin B
 
Posts: n/a
Default date format

Modify the data values to strings using this variant of your existing formula:

=Text(b1,"m/d/yyyy")&" - "&Text(c1,"m/d/yyyy")

If you want different date formats, you can use "dddd, mmmm d, yyyy",
"yy-mmm-dd", just to name a few...
--
Kevin Backmann


"Hru48" wrote:


hey all,

I have worked out the first and last day of the month by using these
formulas

cell A1 is =NOW()
cell B1 is =DATE(YEAR(A1), MONTH(A1),1)
cell c1 is =DATE(YEAR(A1),MONTH(A1)+1,0)

and now I want the results of B1 and C1 in one cell which I thought I
could do with, cell D1 is =b1&" - "&c1

but everytime I try this I loose the date format in D1 and I can't get
it back.

Anyone got any ideas.

Cheers


--
Hru48
------------------------------------------------------------------------
Hru48's Profile: http://www.excelforum.com/member.php...o&userid=24895
View this thread: http://www.excelforum.com/showthread...hreadid=506733


  #5   Report Post  
Posted to microsoft.public.excel.misc
Hru48
 
Posts: n/a
Default date format


Many thanks all!


--
Hru48
------------------------------------------------------------------------
Hru48's Profile: http://www.excelforum.com/member.php...o&userid=24895
View this thread: http://www.excelforum.com/showthread...hreadid=506733

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change general format to US date format woodlot4 Excel Discussion (Misc queries) 3 October 11th 05 12:29 AM
Customized Date Format Frustrated Excel Worksheet Functions 5 October 7th 05 11:30 PM
Compare dates (one cell not in date format) craigcsb Excel Discussion (Misc queries) 5 June 28th 05 05:07 PM
How do I keep the date from changing format in a mail merge? Brynn Wilson Excel Discussion (Misc queries) 1 June 9th 05 06:44 PM
USING THE DATE FORMAT IN EXCEL teach Excel Discussion (Misc queries) 3 December 14th 04 11:55 PM


All times are GMT +1. The time now is 03:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"