![]() |
How to convert this date 07/12/2007 04:47:32 PM WET to the
Hi All,
Does anyone know how to convert this date: 07/12/2007 04:47:32 PM WET to the following one : 7/12/2007 12:47 Is there any date command you know I may use? Thanks, Ed |
How to convert this date 07/12/2007 04:47:32 PM WET to the following one : 7/12/2007 12:47
First off, is that actually a real Excel date in your worksheet, or is it
just Text right now (that is, what does the cell's format show)? Will all your times be in the same time zone (I'm guessing that is what the WET is)? If not, you will need to list the possible time zone abbreviations for us. When you say "convert", do you mean replace what you showed with what you want **in the same cell**? Rick "Ed" wrote in message ... Hi All, Does anyone know how to convert this date: 07/12/2007 04:47:32 PM WET to the following one : 7/12/2007 12:47 Is there any date command you know I may use? Thanks, Ed |
How to convert this date 07/12/2007 04:47:32 PM WET to the
Hi Rick,
Yes, 07/12/2007 04:47:32 PM WET is just a text right now. For your second question, yes, when I say to do the conversion, I mean replacing this Date: 07/12/2007 04:47:32 PM with this one: 7/12/2007 12:47 I think would need a formula to do it, but I don't how to proceed as I am not yet good on Excel. In one of my excel sheet, I have the Date above, in all of its rows, and I want to change all of them and look like this one and its format: 7/12/2007 12:47 Thanks, Ed On Aug 1, 8:02*am, "Rick Rothstein \(MVP - VB\)" wrote: First off, is that actually a real Exceldatein your worksheet, or is it just Text right now (that is, what does the cell's format show)? Will all your times be in the same time zone (I'm guessing that is what the WET is)? If not, you will need to list the possible time zone abbreviations for us. When you say "convert", do you mean replace what you showed with what you want **in the same cell**? Rick "Ed" wrote in message ... Hi All, Does anyone know how toconvertthisdate: *07/12/2007 04:47:32 PM WET to thefollowingone : 7/12/2007 12:47 Is there anydatecommand you know I may use? Thanks, Ed- Hide quoted text - - Show quoted text - |
How to convert this date 07/12/2007 04:47:32 PM WET to the
Hi Rick, Yes, 07/12/2007 04:47:32 PM WET is just a text right now. For your second question, yes, when I say to do the conversion, I mean replacing this Date: 07/12/2007 04:47:32 PM with this one: 7/12/2007 12:47 I think would need a formula to do it, but I don't how to proceed as I am not yet good on Excel. In one of my excel sheet, I have the Date above, in all of its rows, and I want to change all of them and look like this one and its format: 7/12/2007 12:47 Thanks, Ed On Aug 1, 8:02*am, "Rick Rothstein \(MVP - VB\)" wrote: First off, is that actually a real Excel date in your worksheet, or is it just Text right now (that is, what does the cell's format show)? Will all your times be in the same time zone (I'm guessing that is what the WET is)? If not, you will need to list the possible time zone abbreviations for us. When you say "convert", do you mean replace what you showed with what you want **in the same cell**? Rick "Ed" wrote in message ... Hi All, Does anyone know how to convert this date: *07/12/2007 04:47:32 PM WET to the following one : 7/12/2007 12:47 Is there any date command you know I may use? Thanks, Ed- Hide quoted text - - Show quoted text - |
How to convert this date 07/12/2007 04:47:32 PM WET to the
Hi Rick,
Yes, 07/12/2007 04:47:32 PM WET is just a text right now. For your second question, yes, when I say to do the conversion, I mean replacing this Date: 07/12/2007 04:47:32 PM with this one: 7/12/2007 12:47 I think would need a formula to do it, but I don't how to proceed as I am not yet good on Excel. In one of my excel sheet, I have the Date above, in all of its rows, and I want to change all of them and look like this one and its format: 7/12/2007 12:47 Thanks, Ed On Aug 1, 8:02*am, "Rick Rothstein \(MVP - VB\)" wrote: First off, is that actually a real Excel date in your worksheet, or is it just Text right now (that is, what does the cell's format show)? Will all your times be in the same time zone (I'm guessing that is what the WET is)? If not, you will need to list the possible time zone abbreviations for us. When you say "convert", do you mean replace what you showed with what you want **in the same cell**? Rick "Ed" wrote in message ... Hi All, Does anyone know how to convert this date: *07/12/2007 04:47:32 PM WET to the following one : 7/12/2007 12:47 Is there any date command you know I may use? Thanks, Ed- Hide quoted text - - Show quoted text - |
How to convert this date 07/12/2007 04:47:32 PM WET to the fol
Assumptions, you are converting from WET time to your local time always, and
the WET is always at the end. Then, assuming your value is in A1, you could type the following formula: =TEXT(--(LEFT(A1,LEN(A1)-4))-TIME(4,0,0),"dd/mm/yyyy hh:mm am/pm") Hope this helps. And if you need to refer to it as time again, just but the -- in front of the cell you have your converted time in. -- John C "Ed" wrote: Hi Rick, Yes, 07/12/2007 04:47:32 PM WET is just a text right now. For your second question, yes, when I say to do the conversion, I mean replacing this Date: 07/12/2007 04:47:32 PM with this one: 7/12/2007 12:47 I think would need a formula to do it, but I don't how to proceed as I am not yet good on Excel. In one of my excel sheet, I have the Date above, in all of its rows, and I want to change all of them and look like this one and its format: 7/12/2007 12:47 Thanks, Ed On Aug 1, 8:02 am, "Rick Rothstein \(MVP - VB\)" wrote: First off, is that actually a real Excel date in your worksheet, or is it just Text right now (that is, what does the cell's format show)? Will all your times be in the same time zone (I'm guessing that is what the WET is)? If not, you will need to list the possible time zone abbreviations for us. When you say "convert", do you mean replace what you showed with what you want **in the same cell**? Rick "Ed" wrote in message ... Hi All, Does anyone know how to convert this date: 07/12/2007 04:47:32 PM WET to the following one : 7/12/2007 12:47 Is there any date command you know I may use? Thanks, Ed- Hide quoted text - - Show quoted text - |
How to convert this date 07/12/2007 04:47:32 PM WET to the following one : 7/12/2007 12:47
The reason I asked if you wanted to replace the value in the cell is because
you cannot do that with a formula (the cell either has a formula in it or it has data in it, but it can't have both)... you will need to use a VB macro to convert it in place. Since you did not list any other time zone abbreviations, I am guessing that WET is the only one you ever deal with. Here is a macro that will do your conversion. Right click the worksheet tab with your data on it and select View Code from the popup menu that appears. Copy/paste the following into the code window that appeared when you went into the VB editor... Sub ConvertWETdates() Dim C As Range For Each C In Selection If Right(C.Value, 3) = "WET" Then C.Value = DateAdd("h", -4, CDate(Left(C.Value, Len(C.Value) - 3))) End If Next End Sub To use this macro, select all the cells with your WET dates in them, press Alt+F8, select ConvertWETdates from the list and click the RUN button. Rick Yes, 07/12/2007 04:47:32 PM WET is just a text right now. For your second question, yes, when I say to do the conversion, I mean replacing this Date: 07/12/2007 04:47:32 PM with this one: 7/12/2007 12:47 I think would need a formula to do it, but I don't how to proceed as I am not yet good on Excel. In one of my excel sheet, I have the Date above, in all of its rows, and I want to change all of them and look like this one and its format: 7/12/2007 12:47 |
How to convert this date 07/12/2007 04:47:32 PM WET to the
Rick and John,
All your suggestions worked.Thanks for all your help! Ed On Aug 1, 2:34*pm, "Rick Rothstein \(MVP - VB\)" wrote: The reason I asked if you wanted to replace the value in the cell is because you cannot do that with a formula (the cell either has a formula in it or it has data in it, but it can't have both)... you will need to use a VB macro to convert it in place. Since you did not list any other time zone abbreviations, I am guessing that WET is the only one you ever deal with. Here is a macro that will do your conversion. Right click the worksheet tab with your data on it and select View Code from the popup menu that appears. Copy/paste the following into the code window that appeared when you went into the VB editor... Sub ConvertWETdates() * Dim C As Range * For Each C In Selection * * If Right(C.Value, 3) = "WET" Then * * * C.Value = DateAdd("h", -4, CDate(Left(C.Value, Len(C.Value) - 3))) * * End If * Next End Sub To use this macro, select all the cells with your WET dates in them, press Alt+F8, select ConvertWETdates from the list and click the RUN button. Rick Yes,07/12/200704:47:32 PM WET is just a text right now. For your second question, yes, when I say to do the conversion, I mean replacing this Date:07/12/200704:47:32 PM with this one: 7/12/2007 12:47 I think would need a formula to do it, but I don't how to proceed as I am not yet good on Excel. In one of my excel sheet, I have the Date above, in all of its rows, and I want to change all of them and look like this one and its format: 7/12/2007 12:47- Hide quoted text - - Show quoted text - |
All times are GMT +1. The time now is 03:34 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com