+ Reply to Thread
Results 1 to 5 of 5

VBA (or function) to turn a date into a number i.e 12/31/2019 to 2019.12

  1. #1
    Forum Contributor
    Join Date
    06-19-2014
    Location
    Toronto, Canada
    MS-Off Ver
    Office365
    Posts
    273
    I found the solution, trying to delete the posting but couldn't...
    Last edited by lynnsong986; 10-23-2019 at 03:00 PM. Reason: found solution

  2. #2
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,525

    Re: VBA (or function) to turn a date into a number i.e 12/31/2019 to 2019.12

    Would you be so kind and show it for people searching for a solution for the same or similar problem.

  3. #3
    Forum Contributor
    Join Date
    06-19-2014
    Location
    Toronto, Canada
    MS-Off Ver
    Office365
    Posts
    273

    Re: VBA (or function) to turn a date into a number i.e 12/31/2019 to 2019.12

    it's really just a basic formula

    say I have a date
    12/31/2018 in cell A1
    and I want to turn it to 2018.12 as a number.
    the formula would be:

    =YEAR(A1)+Month(A1)/100

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,525

    Re: VBA (or function) to turn a date into a number i.e 12/31/2019 to 2019.12

    And the period (.) I assume
    Thanks.
    If it helps someone else, that will be nice.

  5. #5
    Forum Contributor
    Join Date
    06-19-2014
    Location
    Toronto, Canada
    MS-Off Ver
    Office365
    Posts
    273

    Re: VBA (or function) to turn a date into a number i.e 12/31/2019 to 2019.12

    yea thanks so much for keeping this site going! it is truly great and I personally learnt so much from other people like you!

+ 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] Cannot find date after 09.10.2019
    By bulina2k in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-17-2019, 04:14 AM
  2. Graphing Secondary Axis- Incorrect date (4/19/2019) alignment
    By bjwalter6329 in forum Excel General
    Replies: 1
    Last Post: 10-11-2019, 12:26 PM
  3. [SOLVED] Correct exported date of 3/20/2019 to 3/1/2020
    By aquixano in forum Excel General
    Replies: 4
    Last Post: 09-20-2019, 11:32 AM
  4. Introduction 7/23/2019
    By armysgt0480 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 07-23-2019, 01:12 PM
  5. HMRC Apr 2019 bridging
    By Rivers in forum Office 365
    Replies: 1
    Last Post: 02-09-2019, 12:54 PM
  6. Reflect TBF vacancies over 2018-2019/2019-2020 budget year
    By jennah63 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-28-2019, 07:32 PM
  7. Converting text " 12/31/2019 to date format
    By Gerbilsocks in forum Excel General
    Replies: 1
    Last Post: 01-15-2019, 02:21 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