ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Date Modification (https://www.excelbanter.com/excel-programming/450275-date-modification.html)

sylink[_3_]

Date Modification
 
Please how do convert this using an Excel macro:

06.01.2014 00:00:00
06.07.2014 00:00:00


TO:

06/01/2014
06/07/2014

Claus Busch

Date Modification
 
Hi,

Am Wed, 13 Aug 2014 04:02:26 -0700 (PDT) schrieb sylink:

06.01.2014 00:00:00
06.07.2014 00:00:00

TO:

06/01/2014
06/07/2014


select your data = Format cells = and change the format to
dd/MM/yyyy


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional

sylink[_3_]

Date Modification
 
On Wednesday, August 13, 2014 12:09:33 PM UTC+1, Claus Busch wrote:
Hi,



Am Wed, 13 Aug 2014 04:02:26 -0700 (PDT) schrieb sylink:



06.01.2014 00:00:00


06.07.2014 00:00:00




TO:




06/01/2014


06/07/2014




select your data = Format cells = and change the format to

dd/MM/yyyy





Regards

Claus B.

--

Vista Ultimate / Windows7

Office 2007 Ultimate / 2010 Professional



Thanks for your response. I tried that earlier but it didn''t work. I am using Office 2010. I dont know if there is any other trick

GS[_2_]

Date Modification
 
Please how do convert this using an Excel macro:

06.01.2014 00:00:00
06.07.2014 00:00:00


TO:

06/01/2014
06/07/2014


Assuming subject cells are selected...

In a standard module:

Option Explicit

Sub ConvertDateTimeToDateOnly()
Dim rng
For Each rng In Selection
rng.Value = DateValue(Replace(rng.Value, ".", "/"))
Next 'rng
End Sub

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion




All times are GMT +1. The time now is 01:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com