View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JethroUK©
 
Posts: n/a
Default Convert Date to number?

works fine - thanks


"JethroUK©" wrote in message
...
that's fine

so how will i emmbed this in a string e.g.

="Bill" & TEXT(A1,"yyyymmdd") & "Ben"



"Miguel Zapico" wrote in message
...
You can try with TEXT, like this:
=TEXT(A1,"yyyymmdd")

Miguel.

"JethroUK©" wrote:

p.s. i also tried cell formatting as yyyymmdd, then = "Hello" & A1 -

but
it
doesn't import the format to a string


"JethroUK©" wrote in message
...
How would i convert a date to number as a string

e.g. 10/05/2005 "20050510"

note the month is 2 digit - 05

i cant see Format(A1,"yyyy,mm,dd") & i tried = year(a1) & month(a1)

&
day(a1)

but it returns month as single "2005510"