+ Reply to Thread
Results 1 to 2 of 2

Conversion of SQL Query to a excel code

  1. #1
    Registered User
    Join Date
    11-08-2013
    Location
    SUNNYVALE, CALIFORNIA
    MS-Off Ver
    Excel 2003
    Posts
    40

    Conversion of SQL Query to a excel code

    Hi,
    I have a sql code which gives me the code for getting the fy quarter as below. How do i get it in excel

    'FY' + CONVERT(varchar, Right(DatePart(yy, DateAdd(month, 4, GetDate())), 2))
    'Q' + CONVERT(varchar, DatePart(qq, DateAdd(month, 4, GetDate())))

  2. #2
    Forum Contributor pareshj's Avatar
    Join Date
    05-20-2014
    Location
    MUMBAI
    MS-Off Ver
    2007 & 2010
    Posts
    447

    Re: Conversion of SQL Query to a excel code

    Hi,


    Check the below formula for FY & Quarter:

    Quarter : ="Q" & ROUNDUP(MONTH(TODAY()/3),0)

    FY : ="FY" & RIGHT(YEAR(TODAY()),2)


    Regards,
    Paresh J
    Click on "* Add Reputation" as a way to say thanks

+ 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. Replies: 0
    Last Post: 10-09-2013, 07:17 PM
  2. Query regarding conversion of figures
    By pulkit.bachhawat in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 02-16-2010, 10:15 AM
  3. Excel formula to VBA code conversion
    By secure in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 01-10-2010, 07:01 AM
  4. File conversion query
    By Anna in forum Excel General
    Replies: 3
    Last Post: 04-20-2005, 10:06 AM
  5. Excel code conversion
    By Graham Haughs in forum Excel General
    Replies: 1
    Last Post: 01-29-2005, 04:06 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