+ Reply to Thread
Results 1 to 5 of 5

Convert Column of DateTime to Date

  1. #1
    Registered User
    Join Date
    01-07-2014
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    41

    Convert Column of DateTime to Date

    Hi all,

    I have the following MS Query which is displaying the 'DespatchDate' column as 'DateTime';

    Please Login or Register  to view this content.
    I need this to convert to 'Date'. I don't want it to convert to the 'nearest' date to the time. Literally just need the time removed from the column so I can then do lookups to this column in Excel.

    Anyone have a clue how to do this easily?

    Many thanks in advance,

    TM

  2. #2
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Convert Column of DateTime to Date

    If the date is returned as a date time to excel just change your lookup to lookup int(field containing date time)


    int(date time)=date and use the rest of your formula as you intended

  3. #3
    Registered User
    Join Date
    01-07-2014
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    41

    Re: Convert Column of DateTime to Date

    Hi,

    Many thanks for thw quick reply. I have this formula doing multiple lookups;

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    The highlighted in red part is the lookup for the date from the query.

    How would I adjust this without messing up the entire formula?

  4. #4
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Convert Column of DateTime to Date

    duplicate post
    Last edited by davsth; 05-10-2021 at 08:30 AM.

  5. #5
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Convert Column of DateTime to Date

    Probably the first of the below is what you want. An attachment makes things easier, but this should avoid the array formula

    sumproduct(('Actual Sales (Update Dail (Ent)'!$A$2:$A$1547='Actual (Ent)'!$A$2)*('Actual Sales (int(Update Dail (Ent)'!$D$2:$D$1547)='Actual (Ent)'!$A24)*('Actual Sales (Update Dail (Ent)'!$C$2:$C$1547='Actual (Ent)'!B23)*('Actual Sales (Update Dail (Ent)'!$B$2:$B$1547='Actual (Ent)'!D23)*('Actual Sales (Update Dail (Ent)'!$E$2:$E$1547))

    sumproduct(('Actual Sales (Update Dail (Ent)'!$A$2:$A$1547='Actual (Ent)'!$A$2)*('Actual Sales (Update Dail (Ent)'!$D$2:$D$1547=int('Actual (Ent)'!$A24))*('Actual Sales (Update Dail (Ent)'!$C$2:$C$1547='Actual (Ent)'!B23)*('Actual Sales (Update Dail (Ent)'!$B$2:$B$1547='Actual (Ent)'!D23)*('Actual Sales (Update Dail (Ent)'!$E$2:$E$1547))

+ 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] how to convert irregular day/time data into excel datetime.
    By jrtaylor in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 11-13-2020, 05:15 PM
  2. [SOLVED] Merge date and time column to compare with a single datetime column
    By garyb123 in forum Excel General
    Replies: 4
    Last Post: 09-05-2020, 09:07 AM
  3. [SOLVED] How to convert datetime axis to show interval in days
    By purple_rain09 in forum Excel General
    Replies: 6
    Last Post: 08-17-2019, 04:28 PM
  4. Count If Start Datetime and End Datetime is less than 30 seconds
    By crappygeezer in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-23-2017, 07:48 AM
  5. convert to datetime
    By uinthas in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-07-2017, 05:42 PM
  6. Powerpivot: Convert Datetime to Weekly format (mm/dd - mm/dd)
    By thagasa in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-14-2013, 07:40 PM
  7. Based on a Column datetime value auto calculate and populate a datetime range
    By rajashanmuga in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-22-2010, 04:10 PM

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