+ Reply to Thread
Results 1 to 106 of 106

Date format issue

  1. #1
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Lightbulb Date format issue

    Hello Everyone,
    I am new hear and I am looking solution for one problem I am facing right now.
    I have data in excel which contain two type of data and time formatting which is dd/mm/yyyy 12/05/2022 3:12AM and second one is mm/dd/yyyy 05/13/2022 2:28AM. I am trying to unify one date format so that I can do some hours difference calculation. Because both date format is different it is providing me wrong number of hours difference.
    I tried with text to column option but it is not helping.
    If anyone know and want to share will be really appreciated.

    Thanks
    Amjad

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Date format issue

    formatting of a date and time should not make a difference

    date and time are stored as numbers
    Unless this is a TEXT entry and not a real date

    change to general and it should show a number , and time as the decimal part

    for example
    44893.90363
    is
    28/11/2022 21:41:13

    A sample sheet would help here

    The forum does allow for spreadsheets to be uploaded direct to the forum -

    Please see the Yellow Banner at the top of the page explaining how to attach a sample spreadsheet

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.

    Here are the instructions, found at the top of the page again
    Post a small Excel sheet (not a picture) showing realistic & representative sample data WITHOUT confidential information (10-20 rows, not thousands...) and some manually calculated results. For a new thread (1st post), scroll to Manage Attachments, otherwise scroll down to GO ADVANCED, click, and then scroll down to MANAGE ATTACHMENTS and click again. Now follow the instructions at the top of that screen.
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Hi,

    I attached the sample file with result and also shows which are wrong and why and which are correct date format in sample data.
    I also pasted answer which I am getting from data base for how much days hours and minutes is the difference between Departure time and actual time.
    I want to make one date format so that I can get correct number of hours in difference.
    My result should not be more than a week of days or hours. We have only 7 days maximum Duration, if anything above mean its wrong answer.

    Thanks
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Date format issue

    From an outsider, programmer's perspective, I see nothing "wrong" with the spreadsheet. The dates in columns A and B are numbers as they should be, and the formula in column C is correctly calculating the difference between the date/times in A and B. As etaf says, number formatting should have no impact on the calculations.

    The first incorrect (that you've labeled) entry (row 8) shows Excel correctly calculating the difference between 6 PM on 5 Jan and 7 PM on 5 Jun, which is correctly calculated (in hours) as 3600 hours. If I understand correctly, this should be seen as 6 PM on 1 May and 7 PM on 6 May, which would be a difference of 5 days.

    Have you verified that all of the correct dates are really correct? For example, should the date in row 2 be 4 January or should it be 1 April (currently, it is 4 January)?

    If there's something wrong in the spreadsheet, I suspect that it occurred during data entry/import, when incorrect date information was entered into Excel, so I expect that fixing this is going to be to change the data entry/import process so that the dates are entered correctly. How are you entering or importing this data into Excel? Where does it come from? What are your OS's regional settings (which tell Excel how to interpret date information)?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Hi,
    So the date I verified and it is correct. When people doing entries they are entring wrong format during entry process. This data come from outside sources not from our work place. This sample data range is from Jan to Nov 2022 so December month should not be in the data.

    Secondly, the hours 3625 is wrong because we do not stop at one location that much time. Maximum is 7 days which is 168 hours which is very much not possible as well because it cost a lot. So we can't stop that much time. This is a trailer movement data and we move trailer within 7 maximum days from one location to another. When you copy and change the date format for 01/05/2022 18:05 06/05/2022 19:16 like I did here you will see January 5, 2022 June 5, 2022 which is wrong. The actual date is 1 May 2022 to 6 May 2022 which will gives us 5 days and some hours which is correct as per the data base answer which I also pasted in column "S".
    I need to format date which actually match with Data base column "S" result and that I also calculated through formula in Column C.
    Because this data is not from our workplace we can not change entry process therefore I need to change format so it will give me correct number of hours difference from one location to another.

    Thanks

  6. #6
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Also I did one mistake in raw 12 this one is also wrong.

  7. #7
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Date format issue

    its not a format issue - is the way those dates are imported into excel and how excel has interpreted them

    if you click on any of the cells and change format to general - you will see a number , thats how excel works on dates

    So how is the file generated - do you import the dates
    Because this data is not from our workplace we can not change entry process therefore I need to change format so it will give me correct number of hours difference from one location to another.
    When people doing entries they are entring wrong format during entry process.
    the format should be determined by the system date and time
    Where are these people located ?


    Excel will use one date format when imported based on the computer you are using

    and it cannot tell the difference between MM/DD or DD/MM if they are valid dates

    So if someone in say US is used to MM/DD format and choses to enter the date in a DD/MM system
    then you get the error


    IE
    1st March 2020 - will be seen in an excel with a default format of DD/MM/YY as 1/3/20
    BUT of the system date is MM/DD/YY
    that will be seen as 1/3/20 - Which is 3rd jan 2020

    January 5, 2022 June 5, 2022 which is wrong. The actual date is 1 May 2022 to 6 May 2022
    5th Jan is 5/1 in DD/MM for mat
    But if the system is MM/DD - then that will be seen as still 5/1 - but be 5th May

    i swap spreadsheets on here all over the world and they choose the correct format
    to have a mix like that - its how the info is entered

    can you expand further on this

    Your in Canada , and i understand that any format is allowed - YY/MM/DD , DD/MM/YY or MM/DD/YY

    in UK systems are usually set to DD/MM/YY

    If i have entered dates which can be correct even if MM/DD or DD/MM - ie not changed to text because
    if i entered
    25/12/22
    that would be invalid as a MONTH in US format

  8. #8
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    the format should be determined by the system date and time
    Where are these people located ?

    I and data file sending person both located in Ontario Canada same city.
    I understand above but how can I align date format so that I can get correct difference in hours, because anything in hundreds are wrong. In my data in raw 8 I want the calculate or do some formula which give me this date and hours 01-05-2022 18:05 06-05-2022 19:16 121.2hours. This 121.2 hours is equal to 5 days and some hours.

  9. #9
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    One more thing when trailer hit the geo fence it create date and time and it provide information to Carrier. That carrier send me this data file.

  10. #10
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Date format issue

    It's a relatively simple process to "fix" this after data entry/import. Use the DATE() function coupled with YEAR(), MONTH(), and DAY() functions to "invert" the month and day -- =DATE(YEAR(A2),DAY(A2),MONTH(A2)). The hard part is being able to identify which dates have been incorrectly entered/imported. You have indicated that any difference greater than a week must indicate incorrect data entry/import. Is there more that needs to be considered when determining which values have been incorrectly entered?

    For example, rows 58, 59, and 80 are labeled correct, but these dates are all in December. You indicated in post #5 that none of the dates should be in December, so these rows seem like they are incorrectly entered -- even though the difference seems correct. Perhaps the actual date doesn't matter to you, but it might. You will need to know whether or not these entries are acceptable or not.

    I think the hardest part of this right now is figuring exactly how to determine which dates are correctly entered and which are not. I'm not sure that we on this side of the internet can tell you how to do that. You will need to carefully go through your data and identify the correct dates and incorrect dates and come to some clear understanding of how you determined which were incorrect and which were correct. Once you fully understand the logic needed, then we can distill that down to a series of if..then statements and program the logic into the spreadsheet using IF() functions. We need to rigorously understand the logic, though, before we can do the programming, and I doubt that we on this side of the internet understand your project in enough detail to come up with a rigorous logic that will detect correct and incorrect entries.

  11. #11
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Date format issue

    just to add to MrShorter as i have converted all the dates with C over 168 - BUT you have negatives in C and you say the format is MM/DD/YY - but the month is over 12
    row13
    row60
    and other , i was just going through - but saw the reply

  12. #12
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Yes, thanks for noticing the 58,59, and 80 rows. I just did not check month detail yet but I know December should not be there as we are not in December now. Yes you are right so far I am not looking months but later I need for sure to align. I can distinguish the wrong entries as we have 7 days or less than 7 days moving policy so anything above that hours is wrong. I tried with different formulas but I thing it will not work such as below
    IF(ISNUMBER(A2),DATE(YEAR(A2),DAY(A2),MONTH(A2)),DATE(RIGHT(A2,4),LEFT(A2,FIND("/",A2)-1),MID(A2,FIND("/",A2)+1,FIND("/",A2,FIND("/",A2)+1)-FIND("/",A2)-1))).

    I am asking data file provider to give me at lease one date format let see if they can help out.
    I currently needs to verify that their calculation is correct for Duration and later I need to create something from that data for more automation for next fuel cost.

    Thanks for reply.

  13. #13
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    see column E in attached file
    there are some errors (blank) because Arrival is bigger than Departure

    Actual Arrival Time Actual Departure Time Result I want in hours (Diffrence Departure - Actual Hours) Duration
    27/06/2022 15:01
    07/05/2022 21:05
    -1217.9
    28/09/2022 07:18
    10/01/2022 04:08
    -6267.2
    Attached Files Attached Files
    Last edited by sandy666; 11-29-2022 at 03:01 PM.

  14. #14
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Date format issue

    When I did ISTEXT()/ISNUMBER() on your date, I did not see any text entries among your dates, so the ISNUMBER() test looks to me like it will always return TRUE, and this version will always switch month and day -- even for those entries you have labeled correct. Is that what you want to do?

    As a guess, I tried "assuming any date less than the 12th of the month incorrectly switched month and day" logic =IF(DAY(A2)<=12,DATE(YEAR(A2),DAY(A2),MONTH(A2))+MOD(A2,1),A2) [copy/paste/fill into K2:L100], then take the difference of those columns, I get reasonable results for the sample -- except for row 35 that is still calculating a time longer than 1 week. Your current file has row 35 departing in May before it arrives in June. My correction claims it was there from 27 Jun to 5 July which is longer than a week. How hard is the "never longer than a week" criteria that you've indicated? Is it possible for these times to occasionally be longer than a week?

    Anyway, that's just a guess. I don't really know what you should do here.

  15. #15
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Hi Sandy,

    How you calculate Duration?
    I used this formula =--B2---A2. By using this formula I am getting mostly correct number but some are wrong too excluding the bigger departure date.
    thanks

  16. #16
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    with Power Query my friend

    see Data tab - Show Queries - dbl click on table on the right side

    if Dept-Arrival is > 7 or < 0 then swap day with month else continue Dept-Arrival
    Last edited by sandy666; 11-29-2022 at 03:30 PM.

  17. #17
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Thanks,
    I was thinking to change formatting in Power query what you think will help with current problem?

  18. #18
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    what kind of formatting you want to change?

    I did for both column of dates
    if Dept-Arrival is > 7 or < 0 then swap day with month else continue Dept-Arrival
    and you can see result

    but I've never heard of month number 28
    Last edited by sandy666; 11-29-2022 at 03:36 PM.

  19. #19
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    yes because data entry is wrong.
    such as 27-06-2022 15:01 07-05-2022 21:05 -1217.9 it should be 27 June 2022 to 05-July-2022 and that's why I am getting negative numbers.
    I am asking about how can I fixed those negative. Because those number will be on continually come for future. I want to make template which can help me to copy and paste data and get result for next time.
    Hope you get the idea?

  20. #20
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Date format issue

    If I follow the logic sandy666 used, it was a simple "any time the difference is larger than a week, assume both dates are entered incorrectly and switch month/day for both dates." That logic seems to work for most -- at least as far as getting the correct difference. I'm not sure if it catches the errors like row 58 where the dates are both incorrect but the difference just happens to be correct (because they occur on the same day, so the date information drops out of the subtraction).

    Did you try my simplistic "assume all dates before the 12th of the month were incorrectly entered" logic (I'm confident sandy666 could translate that into power query if you would prefer power query)? As I noted, that seemed to work for all entries assuming that row 35 is correct even though it appears to be longer than a week.

    As I said, the difficult part is the logic of deciding which dates are correct and which are incorrect -- no matter what programming language (spreadsheet formula or power query or other) you use to perform the task. How do you determine which dates are incorrectly entered, and, from there, how do you determine which date should have been entered?

  21. #21
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    in your example you've two reasons of negative values: day/month and Arrival>Departure so you can define if statement for these two but (there's always a "but") in case
    27/06/2022 15:01
    07/05/2022 21:05
    both dates are proper, you cannot swap day/month and Departure - Arrival give you negative value. You can try the trick swap dates (second statement of IF)
    07/05/2022 21:05
    27/06/2022 15:01
    but it will be cheating so you have to manually correct it

    there is no golden solution , sorry
    Unfortunately, the weakest part is the human

    EDIT:
    anyway easier is correct a few errors than 3/4 of table with 1000 rows long
    Last edited by sandy666; 11-29-2022 at 04:35 PM.

  22. #22
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Thanks,
    yes, human is the weakest part for data entries.

  23. #23
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    You are welcome

    you can use Data Validation to check if right date is bigger than left date and block improper manual entry (with copy/paste it doesn't work!)

    so if the problem is solved, hit Add Reputation (bottom left corner next to the post that was helpful)
    and then mark the thread as SOLVED (top above your first post - Thread Tools)
    Last edited by sandy666; 11-29-2022 at 04:47 PM.

  24. #24
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Hi Sandy,

    Today I got the same data but date and time is not in date and time format. I believe it is in string or text because when I do date to general it does not change into number.
    Here is the attachment. I want to do same hours Duration difference.
    How can I do calculation for difference now? Sample 2.xlsxI did with left and right separation but I think there will be batter way.

    here is the current data example.
    ActualArrivalTime ActualDepartureTime
    11/17/2022 12:23 11/17/2022 15:22
    11/23/2022 19:22 11/24/2022 07:25
    03/31/2022 15:04 04/01/2022 2:15

  25. #25
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Date format issue

    common (non-power query) strategies for converting numbers stored as text to numbers: https://support.microsoft.com/en-us/...1-c5bad0f0a885 I used Text to Columns on your data (specifying MDY dates on step 3 of the text import wizard), and seemed to have no trouble converting the text to numbers.

  26. #26
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    I did but some converting into date and time but some are in String.

    Sorry I missed the attachment.
    Attached Files Attached Files

  27. #27
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Date format issue

    I don't know this is better or not but check this and "repair" improper dates

    btw. attaching file read carefully big yellow banner at the top of this page and try to use it in Advanced mode
    Attached Files Attached Files
    Last edited by sandy666; 11-30-2022 at 02:25 PM.

  28. #28
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    You mean 605 error correct not 65?

  29. #29
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    Quote Originally Posted by AMJADMemon View Post
    so the attachment in post#24 is wrong?

    att.png

  30. #30
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    Quote Originally Posted by AMJADMemon View Post
    You mean 605 error correct not 65?
    where you saw 605 ?

  31. #31
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Attachment is correct.
    But here again I am getting issue with hours. The solution you sent me, let say line number 12 of data entry for your solution, it counting 30.days04 hours and 28 minutes. Because someone doing entries in different date format which I believe thats why it calculating 30 days of duration. We do not have anything more than 7 day of stay in duration.

  32. #32
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    this is not a solution, I show you what and where you need to fix with dates
    Solution is contained in the previous example file

    eg.
    05/12/2022 03:12
    13/05/2022 02:28
    Arrival is bigger than Departure
    ###########

    Arrival is bigger than Departure but require swap day/month, however some of the Arrivals are really bigger

    31/03/2022 15:04
    04/01/2022 02:15
    Arrival is bigger than Departure
    ###########
    Last edited by sandy666; 11-30-2022 at 02:50 PM.

  33. #33
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    yes, previous one work but this time I am getting date and time in string and I used the text to column option too but some converted as a normal date and time and some still as a string. Thats why I may need to find how to convert all string into date and time format so that I can get Duration difference.

  34. #34
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    if you want to use Power Query forget about Excel features and functions (sometimes they work sometimes not)
    as you can see all dates are correct, doesn't matter they are in DMY or MDY format, bigger than other or not
    here is solution for that:
    Please Login or Register  to view this content.
    not text2columns
    Last edited by sandy666; 11-30-2022 at 03:01 PM.

  35. #35
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Date format issue

    I did but some converting into date and time but some are in String.
    Sorry I'm a bit late here, but what exactly did you do when you tried Text to Columns? I didn't have any trouble converting the strings to numbers. What I see in your file between post 24 (all text) and post 26 (some text some number) is:

    1) As I noted in post 25, all of the text dates appear to be MDY dates. At step 3 of the text import wizard, I very carefully told Excel to use MDY standards to interpret the dates (and maybe because my US-centric OS settings are set to MDY), and Excel appeared to correctly convert all dates to numbers with no problems.
    2) When I look at your partially converted file in post 26, I notice that those dates that are converted to numbers appear to have been interpreted as DMY dates. Row 5 that I and my MDY settings interpreted as 1 April 2022, your file shows as 4 January 2022.
    3) Assuming that Excel was trying to use a DMY setting to interpret the dates, those dates that are not converted to numbers have no meaning as DMY dates (there is no 17th month or 31st month or ...).

    I will ask again, exactly how are you converting these strings to numbers/dates -- specifically are you doing everything you can to make sure that Excel will see that these start out as MDY dates so that Excel will not try to interpret these as DMY dates. It's beginning to appear to me that the most of the problem (if not all of the problem) appears to be related to Excel mistakenly reading text dates as DMY dates and not recognizing them as MDY dates. If we can figure out how to get the date entry/import process to correctly read in the dates, I suspect that most if not all of the other problems are going to go away.

  36. #36
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Yes. I see. I working on new data in power query to get Duration as we did yesterday. Just need to work on > 7 days stuff in order to get correct duration. just not get yet there.

  37. #37
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    When I uploaded new data into Power Query it automatically change the type. That's nice.

  38. #38
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Date format issue

    see this but I hope you will do everything yourself

    worth to read especially cyan and grey lines of the first table
    Attached Files Attached Files
    Last edited by sandy666; 11-30-2022 at 08:53 PM. Reason: url added

  39. #39
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Thanks Sandy, I used the first technique to create duration but this new one is more good.
    I will create another one to replicate your. Thank you so much.

  40. #40
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    You are welcome

    you've some "errors" in source data, like (dd/mm/yyyy hh:mm:ss PM) or AM), check your own file
    Last edited by sandy666; 11-30-2022 at 09:13 PM.

  41. #41
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149
    Quote Originally Posted by sandy666 View Post
    You are welcome

    you've some "errors" in source data, like (dd/mm/yyyy hh:mm:ss PM) or AM), check your own file
    Yes, I am correcting those as sender did not send me with other errors.

  42. #42
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Hi Sandy I am wondering why are you using filtering for TSR step?

    Table.SelectRows(Duration, each [Duration] < #duration(7, 0, 0, 0) and [Duration] >= #duration(0, 0, 0, 0))

  43. #43
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    to "remove" unnecessary rows
    if you want whole table just delete this step

  44. #44
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Yes, I got it. One more thing the Duration is calculation wrong in your sample file which you sent me. I am attaching file.
    Check the Blue highlights cells I did not highlighted all which are wrong, but it is calculating days in wrong.
    Attached Files Attached Files

  45. #45
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    My dear friend, I think you can do that yourself don't you ?

  46. #46
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Power Query is relatively new to me but let me try again with previous file.

  47. #47
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    sure ............

    btw. from 05 January to 05 June is not a five days with dd/mm/yyyy format of date

    05/01/2022 18:05
    05/06/2022 19:16
    Last edited by sandy666; 12-01-2022 at 12:19 PM.

  48. #48
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    I think I mentioned earlier in the post about date formatting issue when someone entering data, they pick wrong format I believe and that's why it gives me hard time to calculate difference. I mentioned earlier we do not stop trailers more than of 7 days or sometime 2 weeks that will be our max duration time because it cost alot . This date is actually is May/01/2022 18:05
    May/06/2022 19:16. And thats what I am looking solution to find duration difference. This data file coming from out side of our origination. Thats why its calculation wrong Duration in file which you sent and I am looking solution for that.

  49. #49
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    so your whole source table is in MM/DD/YYYY format ?

    could you attach original source file without any text2columns etc etc ? will be best if you set TEXT format to these two columns

    you need to eat something from healthy food to calm down
    Last edited by sandy666; 12-01-2022 at 12:47 PM.

  50. #50
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Here is the ORI file.

    In this file have two type of formatting, I just remove the empty cell from Asset Name.
    Yes. I need something specially today as its my Birthday!
    Attached Files Attached Files

  51. #51
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    sorry I was late, could attach this file again but set these two columns to TEXT format ?

    Happy Birthday to You
    Last edited by sandy666; 12-01-2022 at 12:53 PM.

  52. #52
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    No worries, here I change into text. I know the date in many entries are hard coded I am not sure how the sending person is extracting data.
    Attached Files Attached Files

  53. #53
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    look at this

  54. #54
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    That's awesome. Thanks
    You can guide me for power Query?
    Would you tell me what course I can take for Power Query lol

    Thanks Sandy really appreciated.

  55. #55
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    If you are happy then click on link in post#51 (blue bold)

    sure I can but better will be if you read this with no rush: Learn Power Query, this is like course (to me of course )

  56. #56
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Thanks Sandy!

  57. #57
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    You are welcome

  58. #58
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Hi Sandy,
    just to confirm you work on the file which I sent you on text correct?

  59. #59
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    file is from from post#50 and yes it was correct

  60. #60
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,294

    Re: Date format issue

    Option Power Query
    Please Login or Register  to view this content.
    Attached Files Attached Files

  61. #61
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Thanks, Just did replicate your file and have some error in my. I am just doing to understand the how you did. I checked the steps on Power Query.
    I was try to upload steps for screenshot but due to file limitation I am unable to upload.
    Attached Files Attached Files

  62. #62
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    in progress

    if you see in Duration column something like ######## in the green table filter Duration by this and take screenshot of this (all columns) , enough only lines as you see on the screen
    Last edited by sandy666; 12-02-2022 at 05:15 PM.

  63. #63
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    I mean just for time being I am using file you sent but when I am doing same steps into separate file to create from scratch, my time format in Local not changing in like yours.
    Attached Files Attached Files

  64. #64
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    I asked about screenshot not a word

    like this but I need yours
    screenshot.png
    Last edited by sandy666; 12-02-2022 at 05:33 PM.

  65. #65
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    I dot not have anything ######. I have minus and Plus duration. Only issue I understand is when I do convert into Local time and date, its not converting it as yours.
    Attached Images Attached Images

  66. #66
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    Quote Originally Posted by sandy666 View Post
    in progress

    if you see in Duration column something like ######## in the green table filter Duration by this and take screenshot of this (all columns) , enough only lines as you see on the screen
    my dear friend, could you read the posts more carefully ?

    if there is no ##### filter duration by <0 and take a screenshot from the result, green table
    Last edited by sandy666; 12-02-2022 at 05:58 PM.

  67. #67
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    I got an idea
    delete these two steps and try again
    I need Locale to translate from my system dates to yours but IMHO you don't need it

    delete.png

    these steps you can insert again if necessary

  68. #68
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Sorry misunderstood.
    Now I removed the Local A and B steps. Now I have Duration with ######.
    But I am also getting wrong Duration calculation because date calculating like this
    05-06-2022 20:09 05-07-2022 15:06 29.18:57:00 It should be calculating this 01-05-2022 18:05 06-05-2022 19:16 5.01:11:00.

    I am attaching both screenshot. After removing two steps and #####
    Attached Images Attached Images

  69. #69
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    shit! shit! shit! someone sick in the head produced these dates!

    date like this 24/11/2022 07:25 will (should) change to your MDY format automatically but with date like this 01/04/2022 12:40 system thinking everything is OK
    because system knows the first place cannot be bigger than 12 so it will swap first and second place to MDY
    Last edited by sandy666; 12-02-2022 at 07:21 PM.

  70. #70
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Yes, data entry people don't care. I explain to sender today that those dates are not in even date format. and multiple formatting.

  71. #71
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    But thing is when I copy and past data into your file than it work perfectly. It only give me hard time when I am creating from Scratch.

  72. #72
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    [joke] you'll need to send your file(s) to someone in Europe to correct them and this person send you corrected file (Golden Advice)

  73. #73
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    lol, I want to learn how this work so that next time I can do myself without bugging lol.

  74. #74
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    no problem but I am still in progress

  75. #75
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    I can show all the step I am taking if you need to? just in case?

  76. #76
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    I see that in the file you sent me

  77. #77
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    I see. Just to confirm, you used Get data from table and create Result on other file and later bring the source data into Result file tab correct?

  78. #78
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    a drowning man will clutch at a straw , try this
    - open brand new excel file
    - copy these three columns from old file and paste as value (or paste as text) to this new
    - save it and try again
    Last edited by sandy666; 12-02-2022 at 07:51 PM.

  79. #79
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    I didn't use Get Data but From Table (Alt+A+PT from keyboard) or used trick with Named Range
    Get Data is in 365 but as you can see I am NOT on 365 )
    Last edited by sandy666; 12-02-2022 at 07:56 PM.

  80. #80
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Here is the attachment. Still have same issue. I mention few line correct and wrong in Status column.
    Attached Files Attached Files

  81. #81
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    ok, thanks, I'll look at this a bit later

  82. #82
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    you made a little mistake

    datetime.png

  83. #83
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Date format issue

    ok, here is - not ideal (last time)
    you need to try yourself because our system dates are different and additionally human errors exists (most of them) or butterfly effect
    Attached Files Attached Files
    Last edited by sandy666; 12-03-2022 at 02:21 AM.

  84. #84
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,294

    Re: Date format issue

    Power Query
    Please Login or Register  to view this content.
    Attached Files Attached Files

  85. #85
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    still improper result

    hash.png

  86. #86
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Date format issue

    i think it's a specially crafted file for testing, too many duplicates, a lot of same dates AAT=ADT so i suppose that's enough

  87. #87
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    I have done with Date/Time before. Problem was same. Did not change the result.

  88. #88
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Hi Brabd,
    Query is fine but result is wrong. We do not have anything for 30 days or more than 2 weeks of duration stay.
    Attached Images Attached Images

  89. #89
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Date format issue

    After a couple of pages of Power Query discussion, I will tentatively venture back into the discussion. It still appears to me that the entire problem is that sometimes Power Query is reading a text date as a DMY date when it should be reading as MDY. If I go back to your file in post #24 where all of the entries appear to be "date/time stored as text" and compare, it looks to me like all of the text dates are mm/dd/yyy hh:mm (MDY date with 24 hour clock). If we can get whatever utility we use to read the text to recognize that the text dates are MDY dates, everything should work just fine.

    As I noted back in post #25, I used Text to Columns to read the text data -- carefully specifying that Excel should read the text as MDY dates at step 3 -- and had no trouble converting the text to numbers. I can then handle the missing time stamps as part of the formula in column C [maybe something like =IF(COUNT(A2:B2)<2,"input missing",B2-A2)]. I do not recall any feedback from you on this approach, so I don't know if you had difficulty using Text to Columns, since the discussion from there seemed to focus exclusively on Power Query approaches.

    Since then, it seems that you have preferred the Power Query approach, which should be fine. I cannot help because I do not know how to tell Power Query to "read these text strings as MDY dates and never read them as DMY dates." I assume that Power Query knows how to do that, so I will leave it to those who know Power Query to explain where the "read MDY never DMY" command is. Maybe my purpose is to suggest again that, if you are not required to use Power Query, the old fashioned Text to Columns command might be easier.

  90. #90
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Hi MrShorty,

    I tried text to column in old fashion way but I am getting value error.
    here is the attachment.
    Attached Files Attached Files

  91. #91
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    generally speaking the problem is

    ActualArrivalTime ActualDepartureTime
    should be
    dd/mm/yyyy
    31/03/2022 15:04
    04/01/2022 02:15
    01/04/2022 02:15
    05/12/2022 03:12
    13/05/2022 02:28
    12/05/2022 03:12
    27/06/2022 15:01
    07/05/2022 21:05
    05/07/2022 21:05
    09/12/2022 16:22
    14/09/2022 09:33
    12/09/2022 16:22
    28/09/2022 07:18
    10/01/2022 04:08
    01/10/2022 04:08
    10/12/2022 17:49
    13/10/2022 09:37
    12/10/2022 17:49
    11/12/2022 01:11
    16/11/2022 02:32
    12/11/2022 01:11
    28/04/2022 03:17
    05/02/2022 09:34
    02/05/2022 09:34
    30/05/2022 15:38
    06/01/2022 09:45
    01/06/2022 09:45


    and so on up to 641 rows

    T2C doesn't work, PQ Culture-US/CA doesn't work

    so I filtered out ca. 2000 records (duplicates/zeroes/less than zero)
    I could swap day with month and vice versa but the dates are mixed DMY and MDY so it doesn't make sense
    Last edited by sandy666; 12-05-2022 at 02:01 PM.

  92. #92
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Hi Sandy,

    here is the file I created new with Change type Date/Time and local Canada time.
    Attached Images Attached Images
    Attached Files Attached Files

  93. #93
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    Yeah, I know that
    I'll wait for MrShorty maybe he can enlighten us on how to fix messed up date formats

    01/04/2022 and 04/01/2022 this is the correct date format and T2C or PQ Culture/US/CA don't want to change it

    IMHO golden solution for this is use the same date time format everywhere (Revolution!!! )

    btw. your file still contains 605 improper duration records
    Last edited by sandy666; 12-05-2022 at 02:18 PM.

  94. #94
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Date format issue

    Having a mix of MDY and DMY dates is definitely a problem. I don't know if I have any "magic" fixes. Comparing the file in post #90 with the file in post #24 and I notice that the file in post #90 has a mix of MDY and DMY dates, but the file in post #24 has all MDY dates.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    I would be asking myself where the data for post #24 came from and where the data for post #90 came from and then trying to figure out how I can always get the data from the same source that produced the data in post #24.

    I did find a few dozen problems in the post #24 data. There are a few dozen timestamps with added parentheses and the time is in a 12 hour clock format rather than a 24 hour clock format. Find/Replace (Find what? extraneous character Replace with? nothing) can easily deal with the parentheses and the morning time stamps. The afternoon time stamps would require a little more work, but should be manageable. If I were going back to the source of the data, in addition to how to always get all MDY dates, I might also ask if there is any way to always get all 24 hour clock timestamps.

  95. #95
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    problem is with DMY and MDY , the rest is cosmetic

    AMJADMemon's hard work awaits you, manually correcting over twenty-four thousand dates
    Last edited by sandy666; 12-05-2022 at 02:37 PM.

  96. #96
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Date format issue

    What I am saying is that, as far as I can tell, the data in post #24 has no DMY dates, they are all MDY. I agree that a mix of DMY and MDY is a problem, and the solution is to get all one or the other. In post #24, it seems that we briefly had an all MDY data set.

  97. #97
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    I suggest to use filter for all improper dates (post#86) and if you receive file with mixed formats send the person to The Guantanamo Bay detention camp

  98. #98
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Yes, Post 24 I corrected the data once realize. Sandy something interesting which I am not getting is even though I copy and paste data into file you sent me it gives me correct Duration I don't know how even I tried to created diffrent sample and did same steps like in into Power Query. I will wait for another data sample for sender and will see how the new file comes. Do you think is there any big diff in timing if file was on CVS and I converted into EXCEL?

  99. #99
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    I would like to receive CSV rather than Excel file converted by unknown person (nothing personal) but this is my private opinion

  100. #100
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Got it.
    thanks

  101. #101
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    My Pleasure

  102. #102
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Date format issue

    Yes, Post 24 I corrected the data once realize.
    What do you mean that you corrected the data in post #24? My impression looking at the file in post #24 is that it is ready to be processed as all MDY dates with a few problem entries due to a 12 hour clock. Whatever you did to get the file in post #24 seems like the best way forward.

  103. #103
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Hi Sandy, I am able to replicate now. Now Its fixed.
    Thanks a lot for your and other member for helping me out.

  104. #104
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Date format issue

    Soon you'll be able to create everything yourself without replicating foreign M

  105. #105
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    yes Power query is power full I believe.

  106. #106
    Forum Contributor
    Join Date
    11-28-2022
    Location
    CANADA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    149

    Re: Date format issue

    Hi Sandy,

    I am not sure why few of the entries which does have more than 30 days calculating wrong duration. One duration column is coming from system and one I created on Power Query which you helped me earlier. I am not quite sure why red entries calculating wrong. I am not sure how to attached file on direct msg.

    Thanks
    Attached Files Attached Files
    Last edited by AMJADMemon; 12-21-2022 at 10:04 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Date format issue =Right
    By shakery1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-28-2018, 02:06 AM
  2. Date Format Issue
    By nsprasad in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-09-2015, 02:30 AM
  3. Replies: 4
    Last Post: 04-29-2015, 08:36 AM
  4. date format issue n.2 pls help, thank you
    By cat3appr in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-26-2014, 12:52 PM
  5. Date format issue
    By kesavanprabhu in forum Excel General
    Replies: 3
    Last Post: 06-14-2014, 05:40 AM
  6. [SOLVED] Issue with date format when comparing two date values (I'm in Australia)
    By aaron.irvine in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-08-2013, 01:13 AM
  7. Date Format Issue
    By Mikeice in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-03-2005, 12:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1