Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1
Default how will i convert 05.01.2007 convert 05.Jan.2007 format?


  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 7,247
Default how will i convert 05.01.2007 convert 05.Jan.2007 format?

If you're looking for a worksheet function, with 05.01.2007 in cell A1, use

=DATE(RIGHT(A1,4),MID(A1,5,2),LEFT(A1,2))

This formula assumes that month and day number have the leading "0" (e.g.,
"05" not "5").

If you're looking for a VBA solution, use something like

Dim S As String
Dim Arr As Variant
Dim Dt As Date
S = "05.01.2007"
Arr = Split(S, ".")
Dt = DateSerial(Arr(LBound(Arr) + 2), Arr(LBound(Arr) + 1),
Arr(LBound(Arr)))
Debug.Print Dt



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)





"lady_like" wrote in message
...



  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2
Default how will i convert 05.01.2007 convert 05.Jan.2007 format?

hi Chip,

i want to convert the 01 from "05.01.2007" to a text. 01 is month of January.
so i want to convert it to 05.Jan.2007.


"Chip Pearson" wrote:

If you're looking for a worksheet function, with 05.01.2007 in cell A1, use

=DATE(RIGHT(A1,4),MID(A1,5,2),LEFT(A1,2))

This formula assumes that month and day number have the leading "0" (e.g.,
"05" not "5").

If you're looking for a VBA solution, use something like

Dim S As String
Dim Arr As Variant
Dim Dt As Date
S = "05.01.2007"
Arr = Split(S, ".")
Dt = DateSerial(Arr(LBound(Arr) + 2), Arr(LBound(Arr) + 1),
Arr(LBound(Arr)))
Debug.Print Dt



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)





"lady_like" wrote in message
...




  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 605
Default how will i convert 05.01.2007 convert 05.Jan.2007 format?

Hi,

While you wait for Chip, I can share with you what I did.

I am on a different date system. My regional setting (via control panel) is m-d-yyyy.

In A1 (general format): I key in 1/5/07 and it displays 1/5/2007 where 1 = month i.e. Jan.

In B1: =TEXT(DAY(A1),"00")&"."&TEXT(MONTH(A1),"mmm")&"."& YEAR(A1)

This formula returns 05.Jan.2007

Hope this helps.

Epinn

"lady_like" wrote in message ...
hi Chip,

i want to convert the 01 from "05.01.2007" to a text. 01 is month of January.
so i want to convert it to 05.Jan.2007.


"Chip Pearson" wrote:

If you're looking for a worksheet function, with 05.01.2007 in cell A1, use

=DATE(RIGHT(A1,4),MID(A1,5,2),LEFT(A1,2))

This formula assumes that month and day number have the leading "0" (e.g.,
"05" not "5").

If you're looking for a VBA solution, use something like

Dim S As String
Dim Arr As Variant
Dim Dt As Date
S = "05.01.2007"
Arr = Split(S, ".")
Dt = DateSerial(Arr(LBound(Arr) + 2), Arr(LBound(Arr) + 1),
Arr(LBound(Arr)))
Debug.Print Dt



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)





"lady_like" wrote in message
...





  #5   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,886
Default how will i convert 05.01.2007 convert 05.Jan.2007 format?

Hi

If you are entering text 05.01.07 then you could use the following
Mark the block of cells containing the dates.
DataText to ColumnsNextNextclick the Date radio buttonensure the
dropdown tot he right says DMYFinish
Now Mark the same block of cellsFormatCellsNumberCustom dd.mmm.yy

If you are going to be doing it regularly, you could record a macro
whilst you do it, and then play that back when needed.
--
Regards

Roger Govier


"lady_like" wrote in message
...
hi Chip,

i want to convert the 01 from "05.01.2007" to a text. 01 is month of
January.
so i want to convert it to 05.Jan.2007.


"Chip Pearson" wrote:

If you're looking for a worksheet function, with 05.01.2007 in cell
A1, use

=DATE(RIGHT(A1,4),MID(A1,5,2),LEFT(A1,2))

This formula assumes that month and day number have the leading "0"
(e.g.,
"05" not "5").

If you're looking for a VBA solution, use something like

Dim S As String
Dim Arr As Variant
Dim Dt As Date
S = "05.01.2007"
Arr = Split(S, ".")
Dt = DateSerial(Arr(LBound(Arr) + 2), Arr(LBound(Arr) + 1),
Arr(LBound(Arr)))
Debug.Print Dt



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)





"lady_like" wrote in message
...








  #6   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 605
Default how will i convert 05.01.2007 convert 05.Jan.2007 format?

Roger,

You beat me to it.

I was going to say alternatively, use the custom format dd.mmm.yy.

I am just glad that I thought of it before I read your post, my good teacher.

Epinn


"Roger Govier" wrote in message ...
Hi

If you are entering text 05.01.07 then you could use the following
Mark the block of cells containing the dates.
DataText to ColumnsNextNextclick the Date radio buttonensure the
dropdown tot he right says DMYFinish
Now Mark the same block of cellsFormatCellsNumberCustom dd.mmm.yy

If you are going to be doing it regularly, you could record a macro
whilst you do it, and then play that back when needed.
--
Regards

Roger Govier


"lady_like" wrote in message
...
hi Chip,

i want to convert the 01 from "05.01.2007" to a text. 01 is month of
January.
so i want to convert it to 05.Jan.2007.


"Chip Pearson" wrote:

If you're looking for a worksheet function, with 05.01.2007 in cell
A1, use

=DATE(RIGHT(A1,4),MID(A1,5,2),LEFT(A1,2))

This formula assumes that month and day number have the leading "0"
(e.g.,
"05" not "5").

If you're looking for a VBA solution, use something like

Dim S As String
Dim Arr As Variant
Dim Dt As Date
S = "05.01.2007"
Arr = Split(S, ".")
Dt = DateSerial(Arr(LBound(Arr) + 2), Arr(LBound(Arr) + 1),
Arr(LBound(Arr)))
Debug.Print Dt



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)





"lady_like" wrote in message
...







  #7   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 605
Default how will i convert 05.01.2007 convert 05.Jan.2007 format?

Correction:

I was going to say alternatively, use the custom format dd.mmm.yy. <<


I meant dd.mmm.yyyy.

Epinn

"Epinn" wrote in message ...
Roger,

You beat me to it.

I was going to say alternatively, use the custom format dd.mmm.yy.

I am just glad that I thought of it before I read your post, my good teacher.

Epinn


"Roger Govier" wrote in message ...
Hi

If you are entering text 05.01.07 then you could use the following
Mark the block of cells containing the dates.
DataText to ColumnsNextNextclick the Date radio buttonensure the
dropdown tot he right says DMYFinish
Now Mark the same block of cellsFormatCellsNumberCustom dd.mmm.yy

If you are going to be doing it regularly, you could record a macro
whilst you do it, and then play that back when needed.
--
Regards

Roger Govier


"lady_like" wrote in message
...
hi Chip,

i want to convert the 01 from "05.01.2007" to a text. 01 is month of
January.
so i want to convert it to 05.Jan.2007.


"Chip Pearson" wrote:

If you're looking for a worksheet function, with 05.01.2007 in cell
A1, use

=DATE(RIGHT(A1,4),MID(A1,5,2),LEFT(A1,2))

This formula assumes that month and day number have the leading "0"
(e.g.,
"05" not "5").

If you're looking for a VBA solution, use something like

Dim S As String
Dim Arr As Variant
Dim Dt As Date
S = "05.01.2007"
Arr = Split(S, ".")
Dt = DateSerial(Arr(LBound(Arr) + 2), Arr(LBound(Arr) + 1),
Arr(LBound(Arr)))
Debug.Print Dt



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)





"lady_like" wrote in message
...








  #8   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 605
Default how will i convert 05.01.2007 convert 05.Jan.2007 format?

Roger,

I really like the fact that you are always detailed and I definitely have benefited a lot.

Just want to say how I interpret 05.01.2007. I see it as a short date under regional setting for a country in Europe. Out of curiosity, I went to control panel and experimented. First one I chose was German (Germany) and I got 08.02.2007 for today. Now I know the German format uses dot.

I have a feeling that if someone has a "dot" regional setting and key in 08.02.2007, then this is date format and not text format. If this is true, can we skip the text to column step and go straight to custom format? Maybe we don't even have to use custom format, but can just pick one type from the *date* category under formatcellsnumber.

I am not saying that the OP's regional setting is dot. I am just trying to learn here.

Appreciate your guidance.

Epinn

"Roger Govier" wrote in message ...
Hi

If you are entering text 05.01.07 then you could use the following
Mark the block of cells containing the dates.
DataText to ColumnsNextNextclick the Date radio buttonensure the
dropdown tot he right says DMYFinish
Now Mark the same block of cellsFormatCellsNumberCustom dd.mmm.yy

If you are going to be doing it regularly, you could record a macro
whilst you do it, and then play that back when needed.
--
Regards

Roger Govier


"lady_like" wrote in message
...
hi Chip,

i want to convert the 01 from "05.01.2007" to a text. 01 is month of
January.
so i want to convert it to 05.Jan.2007.


"Chip Pearson" wrote:

If you're looking for a worksheet function, with 05.01.2007 in cell
A1, use

=DATE(RIGHT(A1,4),MID(A1,5,2),LEFT(A1,2))

This formula assumes that month and day number have the leading "0"
(e.g.,
"05" not "5").

If you're looking for a VBA solution, use something like

Dim S As String
Dim Arr As Variant
Dim Dt As Date
S = "05.01.2007"
Arr = Split(S, ".")
Dt = DateSerial(Arr(LBound(Arr) + 2), Arr(LBound(Arr) + 1),
Arr(LBound(Arr)))
Debug.Print Dt



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)





"lady_like" wrote in message
...







  #9   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,886
Default how will i convert 05.01.2007 convert 05.Jan.2007 format?

Hi Epinn

Yes, if the date separator is a period, then the entry is a valid Excel
date which can be formatted in any of the various ways of formatting the
date, without needing any additional transformation of the "raw" data.

--
Regards

Roger Govier


"Epinn" wrote in message
...
Roger,

I really like the fact that you are always detailed and I definitely
have benefited a lot.

Just want to say how I interpret 05.01.2007. I see it as a short date
under regional setting for a country in Europe. Out of curiosity, I
went to control panel and experimented. First one I chose was German
(Germany) and I got 08.02.2007 for today. Now I know the German format
uses dot.

I have a feeling that if someone has a "dot" regional setting and key in
08.02.2007, then this is date format and not text format. If this is
true, can we skip the text to column step and go straight to custom
format? Maybe we don't even have to use custom format, but can just
pick one type from the *date* category under formatcellsnumber.

I am not saying that the OP's regional setting is dot. I am just trying
to learn here.

Appreciate your guidance.

Epinn

"Roger Govier" wrote in message
...
Hi

If you are entering text 05.01.07 then you could use the following
Mark the block of cells containing the dates.
DataText to ColumnsNextNextclick the Date radio buttonensure the
dropdown tot he right says DMYFinish
Now Mark the same block of cellsFormatCellsNumberCustom dd.mmm.yy

If you are going to be doing it regularly, you could record a macro
whilst you do it, and then play that back when needed.
--
Regards

Roger Govier


"lady_like" wrote in message
...
hi Chip,

i want to convert the 01 from "05.01.2007" to a text. 01 is month of
January.
so i want to convert it to 05.Jan.2007.


"Chip Pearson" wrote:

If you're looking for a worksheet function, with 05.01.2007 in cell
A1, use

=DATE(RIGHT(A1,4),MID(A1,5,2),LEFT(A1,2))

This formula assumes that month and day number have the leading "0"
(e.g.,
"05" not "5").

If you're looking for a VBA solution, use something like

Dim S As String
Dim Arr As Variant
Dim Dt As Date
S = "05.01.2007"
Arr = Split(S, ".")
Dt = DateSerial(Arr(LBound(Arr) + 2), Arr(LBound(Arr) + 1),
Arr(LBound(Arr)))
Debug.Print Dt



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)





"lady_like" wrote in message
...








  #10   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2
Default how will i convert 05.01.2007 convert 05.Jan.2007 format?

hi Roger/Epinn,

thanks for your reply. But i already did a report that my format is
05.01.2007 and my boss wants to retain that format.

my problem is, i can't use the formula that Epinn gave to me because i
still have to convert it 01/05/07. is there a way that i can convert it
directly using this format 05.01.2007?


"Roger Govier" wrote:

Hi

If you are entering text 05.01.07 then you could use the following
Mark the block of cells containing the dates.
DataText to ColumnsNextNextclick the Date radio buttonensure the
dropdown tot he right says DMYFinish
Now Mark the same block of cellsFormatCellsNumberCustom dd.mmm.yy

If you are going to be doing it regularly, you could record a macro
whilst you do it, and then play that back when needed.
--
Regards

Roger Govier


"lady_like" wrote in message
...
hi Chip,

i want to convert the 01 from "05.01.2007" to a text. 01 is month of
January.
so i want to convert it to 05.Jan.2007.


"Chip Pearson" wrote:

If you're looking for a worksheet function, with 05.01.2007 in cell
A1, use

=DATE(RIGHT(A1,4),MID(A1,5,2),LEFT(A1,2))

This formula assumes that month and day number have the leading "0"
(e.g.,
"05" not "5").

If you're looking for a VBA solution, use something like

Dim S As String
Dim Arr As Variant
Dim Dt As Date
S = "05.01.2007"
Arr = Split(S, ".")
Dt = DateSerial(Arr(LBound(Arr) + 2), Arr(LBound(Arr) + 1),
Arr(LBound(Arr)))
Debug.Print Dt



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)





"lady_like" wrote in message
...









  #11   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 605
Default how will i convert 05.01.2007 convert 05.Jan.2007 format?

A1=05.01.2007

If it is date format, then you can use the formula I gave earlier.

If it is text, then try this:

In B1 key in:

=LEFT(A1,3)&TEXT(MID(A1,4,2),"mmm")&RIGHT(A1,5) This is assuming that you always have leading zeros i.e. 05 instead of 5 and 01 instead of 1.

Don't know if Roger is up yet. In the meantime, can you tell us what is your regional setting for date. Go to control panelregional and language optionsregional options What does short date look like?

You are in good hands with Roger.

Epinn

"lady_like" wrote in message ...
hi Roger/Epinn,

thanks for your reply. But i already did a report that my format is
05.01.2007 and my boss wants to retain that format.

my problem is, i can't use the formula that Epinn gave to me because i
still have to convert it 01/05/07. is there a way that i can convert it
directly using this format 05.01.2007?


"Roger Govier" wrote:

Hi

If you are entering text 05.01.07 then you could use the following
Mark the block of cells containing the dates.
DataText to ColumnsNextNextclick the Date radio buttonensure the
dropdown tot he right says DMYFinish
Now Mark the same block of cellsFormatCellsNumberCustom dd.mmm.yy

If you are going to be doing it regularly, you could record a macro
whilst you do it, and then play that back when needed.
--
Regards

Roger Govier


"lady_like" wrote in message
...
hi Chip,

i want to convert the 01 from "05.01.2007" to a text. 01 is month of
January.
so i want to convert it to 05.Jan.2007.


"Chip Pearson" wrote:

If you're looking for a worksheet function, with 05.01.2007 in cell
A1, use

=DATE(RIGHT(A1,4),MID(A1,5,2),LEFT(A1,2))

This formula assumes that month and day number have the leading "0"
(e.g.,
"05" not "5").

If you're looking for a VBA solution, use something like

Dim S As String
Dim Arr As Variant
Dim Dt As Date
S = "05.01.2007"
Arr = Split(S, ".")
Dt = DateSerial(Arr(LBound(Arr) + 2), Arr(LBound(Arr) + 1),
Arr(LBound(Arr)))
Debug.Print Dt



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)





"lady_like" wrote in message
...








  #12   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,886
Default how will i convert 05.01.2007 convert 05.Jan.2007 format?

Hi

Then try
=TEXT(SUBSTITUTE(A1,".","/"),"dd.mmm.yy")

--
Regards

Roger Govier


"lady_like" wrote in message
...
hi Roger/Epinn,

thanks for your reply. But i already did a report that my format is
05.01.2007 and my boss wants to retain that format.

my problem is, i can't use the formula that Epinn gave to me because
i
still have to convert it 01/05/07. is there a way that i can convert
it
directly using this format 05.01.2007?


"Roger Govier" wrote:

Hi

If you are entering text 05.01.07 then you could use the following
Mark the block of cells containing the dates.
DataText to ColumnsNextNextclick the Date radio buttonensure the
dropdown tot he right says DMYFinish
Now Mark the same block of cellsFormatCellsNumberCustom
dd.mmm.yy

If you are going to be doing it regularly, you could record a macro
whilst you do it, and then play that back when needed.
--
Regards

Roger Govier


"lady_like" wrote in message
...
hi Chip,

i want to convert the 01 from "05.01.2007" to a text. 01 is month
of
January.
so i want to convert it to 05.Jan.2007.


"Chip Pearson" wrote:

If you're looking for a worksheet function, with 05.01.2007 in
cell
A1, use

=DATE(RIGHT(A1,4),MID(A1,5,2),LEFT(A1,2))

This formula assumes that month and day number have the leading
"0"
(e.g.,
"05" not "5").

If you're looking for a VBA solution, use something like

Dim S As String
Dim Arr As Variant
Dim Dt As Date
S = "05.01.2007"
Arr = Split(S, ".")
Dt = DateSerial(Arr(LBound(Arr) + 2), Arr(LBound(Arr) + 1),
Arr(LBound(Arr)))
Debug.Print Dt



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)





"lady_like" wrote in message
...









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
Help: How do I convert a text date into a real date format japorms Excel Worksheet Functions 4 August 2nd 06 06:36 PM
Can I convert numeric 0510 to time 05:10 by custom cell format? Rita_H Excel Discussion (Misc queries) 4 July 27th 06 01:41 PM
convert number to date format Lesley Excel Discussion (Misc queries) 4 July 12th 06 09:17 PM
How can I convert Arabic numbers to English text format in EXCEL Excel problem Excel Discussion (Misc queries) 0 June 7th 06 04:39 AM
convert from .xls format to .csv format m_ravindran Excel Discussion (Misc queries) 1 November 9th 05 11:22 AM


All times are GMT +1. The time now is 06:11 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"