+ Reply to Thread
Results 1 to 4 of 4

Date and Time formula with special format

  1. #1
    Registered User
    Join Date
    06-19-2012
    Location
    denmark
    MS-Off Ver
    Excel 2003
    Posts
    8

    Date and Time formula with special format

    Hi all,

    Im looking for a formula/function which types the current Date and Time in a special format.

    Format Example:

    2012-06-20T15:04:13Z (YYYY-MM-DD T HH:MM:SS Z)

    I was thinking a combination of the function "TODAY()" and som other stuff, but i cant make it work since the TODAY() function demands that the cell type must be "Date" and not "General".

    Hope you can help.

    Thanks

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Date and Time formula with special format

    =text(now(),"yyyy-mm-dd t hh:mm:ss z") mind you why cant you just custom format the cell yyyy-mm-dd t hh:mm:ss z ?
    Attached Files Attached Files
    Last edited by martindwilson; 06-22-2012 at 04:29 AM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    06-19-2012
    Location
    denmark
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Date and Time formula with special format

    Quote Originally Posted by martindwilson View Post
    =text(now(),"yyyy-mm-dd t hh:mm:ss z") mind you why cant you just custom format the cell yyyy-mm-dd t hh:mm:ss z ?
    Hi,

    Thanks. Sorry i was probably unclear. There cannot be a space before and after the "T" and before the "Z". I've tried to remove the space in your formula, but the dates in columns A still has a Space.

    Bare with me, I didnt know there was a custom format of the cells

  4. #4
    Registered User
    Join Date
    06-19-2012
    Location
    denmark
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Date and Time formula with special format

    I figured it out.

    Thanks for the help

+ 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