+ Reply to Thread
Results 1 to 4 of 4

Displaying calculated date & time

Hybrid View

  1. #1
    Registered User
    Join Date
    08-08-2011
    Location
    Warwick
    MS-Off Ver
    MS365
    Posts
    53

    Displaying calculated date & time

    Hi all,

    I've got the following formula to display the 1st day of a given month:

    DATE(YEAR(TODAY()),MONTH(TODAY()),1), EOMONTH(TODAY(),0)+1)
    and it is displayed using the following format:

    20120101 0000 - yyyymmdd hhmm

    My users' (god bless them) have decided that they want the time to be 0001 not 0000... is it possible to amend my formula to display the 1st day of a given month at 1 minute past midnight (0000)?

    Thanks in advance,


    - Jon
    Last edited by JonathanMoore; 12-12-2011 at 11:05 AM.

  2. #2
    Valued Forum Contributor mohd9876's Avatar
    Join Date
    05-04-2011
    Location
    Amman, Jordan
    MS-Off Ver
    Excel 2010
    Posts
    426

    Re: Displaying calculated date & time

    you can add 1 minute to you formula as follows:

    DATE(YEAR(TODAY()),MONTH(TODAY()),1)+TIME(0,1,0)

  3. #3
    Registered User
    Join Date
    08-08-2011
    Location
    Warwick
    MS-Off Ver
    MS365
    Posts
    53

    Re: Displaying calculated date & time

    Thats great - thanks for that!

    Timely help as always!!

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,738

    Re: Displaying calculated date & time

    It's not clear to me what your original formula is doing but if you can use EOMONTH as you have done there then this will give you 1 minute after midnight on the first of the current month

    =EOMONTH(TODAY(),-1)+"24:01"
    Audere est facere

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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