Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 358
Default Convert text date to general number

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default Convert text date to general number

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 358
Default Convert text date to general number

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default Convert text date to general number

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 358
Default Convert text date to general number

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 663
Default Convert text date to general number

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default Convert text date to general number

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
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
how do I convert a general number to a time format? doveness Excel Worksheet Functions 6 May 26th 06 12:39 AM
how to convert julian date to general date arkprabha Excel Worksheet Functions 1 April 3rd 06 10:22 AM
General Number field has 19820431. How to convert to 04/31/1982? Leigh Excel Discussion (Misc queries) 6 March 23rd 06 06:44 AM
How do I convert a number formated as a date to text in Excel? BrotherNov Excel Discussion (Misc queries) 5 March 2nd 05 03:51 PM
Convert data type of cells to Text,Number,Date and Time Kevin Excel Worksheet Functions 1 December 31st 04 12:57 PM


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

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

About Us

"It's about Microsoft Excel"