+ Reply to Thread
Results 1 to 8 of 8

Datetime to date and time

  1. #1
    Registered User
    Join Date
    01-15-2016
    Location
    englanf
    MS-Off Ver
    2007
    Posts
    42

    Datetime to date and time

    Hi,

    I have a excel with lots of datetime, weekly.
    Is there a macro to splt the date and time from datetime field?
    I have a sheet for example
    Attached Files Attached Files
    Last edited by mdek; 02-08-2016 at 03:36 PM.

  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: Datetime to date and time

    you could just say
    =a1
    in both cells and then change the format
    custom format

    DD/MM/YYYY
    to just show the date

    and then
    HH:MM:SS
    for the time
    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 Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Datetime to date and time

    Why do you need a macro?

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

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


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    01-15-2016
    Location
    englanf
    MS-Off Ver
    2007
    Posts
    42

    Re: Datetime to date and time

    The data is dynamic, so with a push of a button, data will be read from a database file and the datetime has te be seperate for the orders

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Datetime to date and time

    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Datetime to date and time

    Try the attached code.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-15-2016
    Location
    englanf
    MS-Off Ver
    2007
    Posts
    42

    Re: Datetime to date and time

    Thanks you all for the input!!
    Got i working perfect!!

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Datetime to date and time

    You're welcome.

+ 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. Split datetime to date and time
    By mdek in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-05-2016, 05:54 PM
  2. Split datetime to date and time
    By mdek in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-05-2016, 05:53 PM
  3. if statement for datetime value between two other datetime values
    By OSepulvedaIII in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-15-2016, 10:37 AM
  4. [SOLVED] reference date time range, return the value into all cell that match datetime range
    By Jarvco13 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-22-2013, 10:39 PM
  5. Replies: 5
    Last Post: 10-28-2010, 03:24 PM
  6. 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