Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
I have a text value for the date. I want to convert it to a number (ie from 190707 to 39282). Please note the format of the date is ddmmyy -- Andrew |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Make sure the cells are not formatted as text, then do datatext to columns,
click next twice, in step 3 select date under column data format and from date dropdown select DMY, click finish -- Regards, Peo Sjoblom "Andrew" wrote in message ... Hi, I have a text value for the date. I want to convert it to a number (ie from 190707 to 39282). Please note the format of the date is ddmmyy -- Andrew |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Sorry, I should have explained I had the date in a variable name (The_Date)
in VBA code. Any ideas? -- Andrew "Peo Sjoblom" wrote: Make sure the cells are not formatted as text, then do datatext to columns, click next twice, in step 3 select date under column data format and from date dropdown select DMY, click finish -- Regards, Peo Sjoblom "Andrew" wrote in message ... Hi, I have a text value for the date. I want to convert it to a number (ie from 190707 to 39282). Please note the format of the date is ddmmyy -- Andrew |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try this...
The_Date = "190707" SerialNumber = CDbl(DateSerial("20" & Right$(The_Date, 2), _ Mid$(The_Date, 3, 2), Left$(The_Date, 2))) Rick "Andrew" wrote in message ... Sorry, I should have explained I had the date in a variable name (The_Date) in VBA code. Any ideas? -- Andrew "Peo Sjoblom" wrote: Make sure the cells are not formatted as text, then do datatext to columns, click next twice, in step 3 select date under column data format and from date dropdown select DMY, click finish -- Regards, Peo Sjoblom "Andrew" wrote in message ... Hi, I have a text value for the date. I want to convert it to a number (ie from 190707 to 39282). Please note the format of the date is ddmmyy -- Andrew |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You legend!
Thanks You deserve your MVP -- Andrew "Rick Rothstein (MVP - VB)" wrote: Try this... The_Date = "190707" SerialNumber = CDbl(DateSerial("20" & Right$(The_Date, 2), _ Mid$(The_Date, 3, 2), Left$(The_Date, 2))) Rick "Andrew" wrote in message ... Sorry, I should have explained I had the date in a variable name (The_Date) in VBA code. Any ideas? -- Andrew "Peo Sjoblom" wrote: Make sure the cells are not formatted as text, then do datatext to columns, click next twice, in step 3 select date under column data format and from date dropdown select DMY, click finish -- Regards, Peo Sjoblom "Andrew" wrote in message ... Hi, I have a text value for the date. I want to convert it to a number (ie from 190707 to 39282). Please note the format of the date is ddmmyy -- Andrew |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
For more information, please refer to the following site: http://www.contextures.com/xlDataEntry02.html Challa Prabhu "Andrew" wrote: Hi, I have a text value for the date. I want to convert it to a number (ie from 190707 to 39282). Please note the format of the date is ddmmyy -- Andrew |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Just to keep things straight... my MVP is not for Excel related
activities... it is for programming in Visual Basic (the compiled version). I'm a relative new comer to the Excel world (well, actually, a returnee after a long absence), but I find a lot of the programming skills I acquired over in the compiled world of VB can be translated into Excel, so every now and then I can "get one right". With that said, I like to point out that these various Excel newsgroups have several Excel MVPs (and several non-MVPs as well) who are the true legends... I've seen displays of Excel related skills by these individuals which I find truly amazing and awe inspiring. They volunteer their time and skills to help others here... these are the people who deserve your praise, not me (trust me on that). Rick "Andrew" wrote in message ... You legend! Thanks You deserve your MVP -- Andrew "Rick Rothstein (MVP - VB)" wrote: Try this... The_Date = "190707" SerialNumber = CDbl(DateSerial("20" & Right$(The_Date, 2), _ Mid$(The_Date, 3, 2), Left$(The_Date, 2))) Rick "Andrew" wrote in message ... Sorry, I should have explained I had the date in a variable name (The_Date) in VBA code. Any ideas? -- Andrew "Peo Sjoblom" wrote: Make sure the cells are not formatted as text, then do datatext to columns, click next twice, in step 3 select date under column data format and from date dropdown select DMY, click finish -- Regards, Peo Sjoblom "Andrew" wrote in message ... Hi, I have a text value for the date. I want to convert it to a number (ie from 190707 to 39282). Please note the format of the date is ddmmyy -- Andrew |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do I convert a general number to a time format? | Excel Worksheet Functions | |||
how to convert julian date to general date | Excel Worksheet Functions | |||
General Number field has 19820431. How to convert to 04/31/1982? | Excel Discussion (Misc queries) | |||
How do I convert a number formated as a date to text in Excel? | Excel Discussion (Misc queries) | |||
Convert data type of cells to Text,Number,Date and Time | Excel Worksheet Functions |