+ Reply to Thread
Results 1 to 14 of 14

Convert serial date to day format

  1. #1
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Convert serial date to day format

    Hello
    I have this function which returns the first day of any month
    it returns the serial number for that date
    Please Login or Register  to view this content.
    I know how to format cell in excel by Custom then ddd
    or I can edit the formula to be like that:
    Please Login or Register  to view this content.
    But I can't edit the function to be able to get the desired result
    I tried this line
    Please Login or Register  to view this content.
    but i got value error

  2. #2
    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,428

    Re: Convert serial date to day format

    Try:

    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


  3. #3
    Registered User
    Join Date
    11-12-2014
    Location
    New York
    MS-Off Ver
    2010
    Posts
    28

    Re: Convert serial date to day format

    Are you trying to call the Text function in VBA?
    Please Login or Register  to view this content.

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Convert serial date to day format

    What do you want the function to return?
    You declared the return data type as Date, but the last line gives you String type.
    Please Login or Register  to view this content.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Convert serial date to day format

    Or similarly,

    Please Login or Register  to view this content.
    Or you could return a date and then format as ddd:

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Convert serial date to day format

    Thank you very much
    The problem was in variable As Date
    Just a question. when declared As Date i got serials not dates .. how to convert these serials to dates

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Convert serial date to day format

    If you are using as formula in cell, change the cell format to date.

  8. #8
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Convert serial date to day format

    I merged two functions one for first day and one for last day
    Please Login or Register  to view this content.
    What can I do to get blank results if the cell value is blank?
    I tried this line at first but got value errors

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Convert serial date to day format

    =if(a1<>"",FirstLastDay(a1),"")
    ?

  10. #10
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Convert serial date to day format

    I fixed it
    Please Login or Register  to view this content.
    But I need another criterion for text entries
    i tried Istext(dtmDate) but got error at the function

  11. #11
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Convert serial date to day format

    I give up.....

  12. #12
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Convert serial date to day format

    Quote Originally Posted by jindon View Post
    I give up.....
    I followed your replies and they are great in fact.
    But I want the function itself to be edited to get my own results as I wish.
    Generally thanks for all valuable information you provided

  13. #13
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Convert serial date to day format

    OK any suggestion about that
    Please Login or Register  to view this content.
    Last edited by YasserKhalil; 01-03-2015 at 07:45 PM.

  14. #14
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Convert serial date to day format

    Hi,

    Maybe this ?

    Please Login or Register  to view this content.
    Regards
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

+ 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] Convert date string to serial number
    By amalfaro in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 01-21-2014, 01:36 PM
  2. how to convert date serial number to regular date?
    By union in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-21-2013, 10:15 PM
  3. Convert date and time in serial number format to text format
    By nda13112 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-11-2013, 02:45 PM
  4. Convert Serial Number to Date WITH TEXT
    By HP RodNuclear in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-20-2010, 12:39 PM
  5. [SOLVED] Convert SERIAL date back into dd/mm/yy format?
    By Aussie CPA in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-29-2005, 10:05 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