ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Date format in string (https://www.excelbanter.com/excel-discussion-misc-queries/87873-date-format-string.html)

Adam Thwaites

Date format in string
 
I have this code:
="Week Beginning " & Date-WEEKDAY(Date,3)
which I can't stop coming out as:
Week Beginning 38719

I tried:
="Week Beginning " & format((Date-WEEKDAY(Date,3)),"dd" & "/" & "mm" & "/" &
"yyyy")
but that just comes up as #NAME

Any suggestions?
--
Adam Thwaites
Access Database Designer

Manchester, UK

Bob Phillips

Date format in string
 
="Week Beginning " & text(TODAY()-WEEKDAY(TODAY(),3),"dd mmm yyyy")


--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"Adam Thwaites" wrote in message
...
I have this code:
="Week Beginning " & Date-WEEKDAY(Date,3)
which I can't stop coming out as:
Week Beginning 38719

I tried:
="Week Beginning " & format((Date-WEEKDAY(Date,3)),"dd" & "/" & "mm" & "/"

&
"yyyy")
but that just comes up as #NAME

Any suggestions?
--
Adam Thwaites
Access Database Designer

Manchester, UK




Gary''s Student

Date format in string
 
Consider using TEXT():


="Week Beginning: " & TEXT(TODAY()+4,"dd/mm/yyy")
will display as:
Week Beginning: 14/05/2006

--
Gary''s Student


"Adam Thwaites" wrote:

I have this code:
="Week Beginning " & Date-WEEKDAY(Date,3)
which I can't stop coming out as:
Week Beginning 38719

I tried:
="Week Beginning " & format((Date-WEEKDAY(Date,3)),"dd" & "/" & "mm" & "/" &
"yyyy")
but that just comes up as #NAME

Any suggestions?
--
Adam Thwaites
Access Database Designer

Manchester, UK


JE McGimpsey

Date format in string
 
One way:

="Week Beginning" & TEXT(Date-WEEKDAY(Date, 3), "dd/mm/yyyy")


In article ,
Adam Thwaites wrote:

I have this code:
="Week Beginning " & Date-WEEKDAY(Date,3)
which I can't stop coming out as:
Week Beginning 38719

I tried:
="Week Beginning " & format((Date-WEEKDAY(Date,3)),"dd" & "/" & "mm" & "/" &
"yyyy")
but that just comes up as #NAME

Any suggestions?



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com