First column the date and time are together and i need to go back 10 hours which would be 30th september 2019 14:00 PM ,
Can you please provide the formula
01/10/2019 00:00:29
01/10/2019 00:01:16
01/10/2019 00:01:51
First column the date and time are together and i need to go back 10 hours which would be 30th september 2019 14:00 PM ,
Can you please provide the formula
01/10/2019 00:00:29
01/10/2019 00:01:16
01/10/2019 00:01:51
Last edited by AliGW; 02-10-2020 at 02:52 AM. Reason: Urgency statement removed from thread title.
Try this...
=A2-(10/24)
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
Hi i need to subtract 6 hours from the below , i have tried the formula A1-6/24 , it doesnt work . It is a 12 hour AM/PM time format
6/25/2020 2:59:56 PM
You need brackets:
=A1-(6/24)
Administrative Note:
Although we value your privacy as much you do, it could be important that members have a rough idea of your location as the solutions they offer may be affected by your locale. For instance, you might in the future post questions which are related to your regional settings.
With this in mind, please update your profile to something more precise (something such as UK, Europe, USA, UAE, etc. will suffice).
Thank you for helping us to help you.
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
Hello AliGW
It does work and puts the word "VALUE" in cell and says the value used in the formula is of the wrong data type.
OK - attach a workbook.
I am unable to attach the file. Can you copy the text that i have provided into singles cell without any spaces and provide me the workbook with the formula
6/24/2020 8:24:04 PM
6/25/2020 2:39:56 PM
6/27/2020 3:28:51 PM
6/28/2020 3:32:37 PM
6/25/2020 4:15:19 PM
6/25/2020 4:07:18 PM
No, because that won't get to the bottom of the problem, sorry.
You need to provide a WB that shows the issue.
What is stopping you?
The dates you have just posted are in US format - I suspect there is a settings issue, but I can't be sure without seeing the WB.
Last edited by AliGW; 07-01-2020 at 08:37 AM.
How do i attach it ? i am unable to see the option.
Start a post, then click Go Advanced bottom right - scroll down to Manage Attachments.
Hi
I have uploaded the attachment here
As I suspected, the entries are just text, not date values. Where have they come from? How have you imported them? They Are in US date format, so you are going to need to convert them to dd/mm/yyyy before you can work with them.
https://kickthatcomputer.wordpress.c...rmat-in-excel/
You could also try this formula in B2:
=IF(ISTEXT(A2),--SUBSTITUTE(TRIM(MID(SUBSTITUTE(LEFT(TEXT(A2,"dd/mm/yyyy"),10),"/",REPT(" ",9)),9,9)&REPLACE(SUBSTITUTE(LEFT(TEXT(A2,"dd/mm/yyyy"),10),"/",REPT(" ",9)),9,9,""))," ","/")+IF(ISTEXT(A2),--MID(A2,FIND(" ",A2)+1,99),A2),A2)
This will convert your text into date format.
Hi AliGW
Thanks i have tried the steps provided in the link but it doesnt work , The entry stays as 6/24/2020 8:24:04 PM and doesnt get converted into 24/6/2020 8:24:04 PM
I have also tried your formula , it converts text into date format but it doesnt subtract 6 hours from the time , it has added 18 hours to the time
6/24/2020 8:24:04 PM has become 25/06/2020 14:39
From the workbook attached to my last post:
Excel 2016 (Windows) 32 bit
A B C 1Timezone 26/24/2020 8:24:04 PM 24/06/2020 20:24 25/06/2020 02:24 36/25/2020 2:39:56 PM 25/06/2020 14:39 25/06/2020 20:39 46/27/2020 3:28:51 PM 27/06/2020 15:28 27/06/2020 21:28 56/28/2020 3:32:37 PM 28/06/2020 15:32 28/06/2020 21:32 66/25/2020 4:15:19 PM 25/06/2020 16:15 25/06/2020 22:15 76/25/2020 4:07:18 PM 25/06/2020 16:07 25/06/2020 22:07
Sheet: Sheet1
Excel 2016 (Windows) 32 bit
B C 2 =IF(ISTEXT(A2),--SUBSTITUTE(TRIM(MID(SUBSTITUTE(LEFT(TEXT(A2,"dd/mm/yyyy"),10),"/",REPT(" ",9)),9,9)&REPLACE(SUBSTITUTE(LEFT(TEXT(A2,"dd/mm/yyyy"),10),"/",REPT(" ",9)),9,9,""))," ","/")+IF(ISTEXT(A2),--MID(A2,FIND(" ",A2)+1,99),A2),A2) =B2+(6/24)
Sheet: Sheet1
Hi Ali
Never mind , i have seen the file you provided and have used the formula from it and it works now
Thanks for your help
No worries.
If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks