Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
yyyymmdd date format
hello,
I have a data base with no date format, just a series of numbers like 20041128 for November 28th year 2004. How can I give this information a date format? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
yyyymmdd date format
Assume that value is in A1
in B1 =DATEVALUE(MID(A1,5,2) & "/" & RIGHT(A1,2) & "/" & LEFT(A1,4)) then format the cell with the formula with a date format. -- Regards, Tom Ogilvy "German Velasquez" wrote in message om... hello, I have a data base with no date format, just a series of numbers like 20041128 for November 28th year 2004. How can I give this information a date format? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
yyyymmdd date format
If you convert it to a real date, you can format it (via format|cells|number
tab) any way you want. One way to convert a column of those type values is to select the column, then Data|text to columns Choose Fixed width (remove any line that excel guessed--and don't add any of your own) Choose a format of ymd and plop it right back where you picked it up. German Velasquez wrote: hello, I have a data base with no date format, just a series of numbers like 20041128 for November 28th year 2004. How can I give this information a date format? -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
yyyymmdd date format
"German Velasquez" wrote: hello, I have a data base with no date format, just a series of numbers like 20041128 for November 28th year 2004. How can I give this information a date format? There may be a cleaner hack than this. But it will work. =DATE(LEFT(cell_reference,4),MID(cell_reference,5, 2),RIGHT(cell_reference,2)) |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
yyyymmdd date format
Hi Tom, and German,
Why wouldn't you use =DATE(LEFT(A1,4), MID(A1,5,2), Right(A1,2)) which should be easier on Excel and would be valid no matter what their Regional settings are for date. Since my regional settings are usually set to yyyy-mm-dd your formula would fail for me. --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "Tom Ogilvy" wrote in message ... Assume that value is in A1 in B1 =DATEVALUE(MID(A1,5,2) & "/" & RIGHT(A1,2) & "/" & LEFT(A1,4)) then format the cell with the formula with a date format. -- Regards, Tom Ogilvy "German Velasquez" wrote in message om... hello, I have a data base with no date format, just a series of numbers like 20041128 for November 28th year 2004. How can I give this information a date format? |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
yyyymmdd date format
Hi
and another option =--TEXT(--A1,"0000-00-00") and format as date -- Regards Frank Kabel Frankfurt, Germany "German Velasquez" schrieb im Newsbeitrag om... hello, I have a data base with no date format, just a series of numbers like 20041128 for November 28th year 2004. How can I give this information a date format? |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
yyyymmdd date format
Frank,
Out of interest, what is the meaning of "--" in Excel formulae ? NickHK "Frank Kabel" wrote in message ... Hi and another option =--TEXT(--A1,"0000-00-00") and format as date -- Regards Frank Kabel Frankfurt, Germany "German Velasquez" schrieb im Newsbeitrag om... hello, I have a data base with no date format, just a series of numbers like 20041128 for November 28th year 2004. How can I give this information a date format? |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
yyyymmdd date format
-- converts numbers returned as text or logical values (TRUE/FALSE) into
numerical values, similar to the function VALUE(), but I think the latter can't convert the logical values. KL "NickHK" wrote in message ... Frank, Out of interest, what is the meaning of "--" in Excel formulae ? NickHK "Frank Kabel" wrote in message ... Hi and another option =--TEXT(--A1,"0000-00-00") and format as date -- Regards Frank Kabel Frankfurt, Germany "German Velasquez" schrieb im Newsbeitrag om... hello, I have a data base with no date format, just a series of numbers like 20041128 for November 28th year 2004. How can I give this information a date format? |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
yyyymmdd date format
It's a thing that Frank does so that people ask what it is :)
But seriously... It's a double unary operator - it has special uses. There's a great thread about it - he http://groups.google.com/groups?hl=e...ing.google.com And here's some good reading: http://www.xldynamic.com/source/xld.SUMPRODUCT.html -- Rob van Gelder - http://www.vangelder.co.nz/excel "NickHK" wrote in message ... Frank, Out of interest, what is the meaning of "--" in Excel formulae ? NickHK "Frank Kabel" wrote in message ... Hi and another option =--TEXT(--A1,"0000-00-00") and format as date -- Regards Frank Kabel Frankfurt, Germany "German Velasquez" schrieb im Newsbeitrag om... hello, I have a data base with no date format, just a series of numbers like 20041128 for November 28th year 2004. How can I give this information a date format? |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
yyyymmdd date format
Hi Rob
It's a thing that Frank does so that people ask what it is :) lol Good guess from your side but why tell my small secret... ;-) Regards Frank |
#11
Posted to microsoft.public.excel.programming
|
|||
|
|||
yyyymmdd date format
Rob,
The Excel v. VBA handling of booleans seems a bit screwy. Assuming A1=TRUE: ?range("A1").Value=true True ?-range("A1").Value=true False ?--range("A1").Value=true True ?10*range("A1").Value -10 ?10*--range("A1").Value -10 I can't see the logic for all the above to be valid. NickHK "Rob van Gelder" wrote in message ... It's a thing that Frank does so that people ask what it is :) But seriously... It's a double unary operator - it has special uses. There's a great thread about it - he http://groups.google.com/groups?hl=e...10528.5bb58 1 37%40posting.google.com And here's some good reading: http://www.xldynamic.com/source/xld.SUMPRODUCT.html -- Rob van Gelder - http://www.vangelder.co.nz/excel "NickHK" wrote in message ... Frank, Out of interest, what is the meaning of "--" in Excel formulae ? NickHK "Frank Kabel" wrote in message ... Hi and another option =--TEXT(--A1,"0000-00-00") and format as date -- Regards Frank Kabel Frankfurt, Germany "German Velasquez" schrieb im Newsbeitrag om... hello, I have a data base with no date format, just a series of numbers like 20041128 for November 28th year 2004. How can I give this information a date format? |
#12
Posted to microsoft.public.excel.programming
|
|||
|
|||
yyyymmdd date format
As in many other languages, in VBA, when coercing numbers to a boolean
value, zero is evaluated as False, any non-zero value will be evaluated as True. A True value in VBA will be coerced to -1 in a math operation. In XL, the coercion is to +1. In article , "NickHK" wrote: Rob, The Excel v. VBA handling of booleans seems a bit screwy. Assuming A1=TRUE: ?range("A1").Value=true True ?-range("A1").Value=true False ?--range("A1").Value=true True ?10*range("A1").Value -10 ?10*--range("A1").Value -10 I can't see the logic for all the above to be valid. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do I change the date format from yyyymmdd to mm/dd/yyyy | Excel Worksheet Functions | |||
Change date from yyyymmdd to valid date format | Excel Discussion (Misc queries) | |||
How do I change date yyyymmdd to a Excel-supported date format? | Excel Worksheet Functions | |||
I need a yyyymmdd date format with no dashes | Excel Discussion (Misc queries) | |||
Is there an Excel date format as follows: yyyymmdd? | Excel Discussion (Misc queries) |