Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JethroUK©
 
Posts: n/a
Default Convert Date to number?

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"


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

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"




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Miguel Zapico
 
Posts: n/a
Default Convert Date to number?

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"





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sandy Mann
 
Posts: n/a
Default Convert Date to number?

There may be better ways but:

=TEXT(YEAR(E10),"####")&TEXT(MONTH(E10),"0#")&TEXT (DAY(E10),"0#")

returns what you are looking for
--
HTH

Sandy
In Perth, the ancient capital of Scotland


with @tiscali.co.uk


"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"




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sandy Mann
 
Posts: n/a
Default Convert Date to number?

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


There I told you there may be better ways! <g
--

Sandy
In Perth, the ancient capital of Scotland


with @tiscali.co.uk





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

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"







  #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"









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
Convert displayed number to absolute value jmorris305 Excel Discussion (Misc queries) 3 February 28th 06 01:27 AM
How do I convert hh:mm:ss to an absolute number (26:01:32 to 26)? Fernando Excel Discussion (Misc queries) 1 December 1st 05 05:02 PM
Need help: convert seconds to date and time misty1 Excel Discussion (Misc queries) 2 November 26th 05 04:12 AM
How can I convert a date into a week number... msbutton27 Excel Worksheet Functions 7 May 25th 05 09:44 PM
changing a cell from date to a number mwhite Excel Worksheet Functions 1 March 22nd 05 04:35 PM


All times are GMT +1. The time now is 12:54 AM.

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

About Us

"It's about Microsoft Excel"