Alpha Video Training
Results 1 to 10 of 10

Thread: Code help with Between dates

  1. #1
    Member
    Real Name
    John Mucci
    Join Date
    Nov 2010
    Location
    New York
    Posts
    313

    Default Code help with Between dates

    Need a little help with Between date code.

    What I'm trying to accomplish is the following between(ctod("01/01/2010"), date_is_in_this_year(txdate)) I know this does not work, however, looking for a solution.

    Thanks,
    John

  2. #2
    "Certified" Alphaholic Ray in Capetown's Avatar
    Real Name
    Ray Hendler
    Join Date
    Jan 2009
    Location
    South Africa
    Posts
    2,036

    Default Re: Code help with Between dates

    Quote Originally Posted by jtm311 View Post
    Need a little help with Between date code.

    What I'm trying to accomplish is the following between(ctod("01/01/2010"), date_is_in_this_year(txdate)) I know this does not work, however, looking for a solution.

    Thanks,
    John
    Not sure where your problem is, maybe this will help
    Code:
    ?between(ctod("01/01/2011"),ctod("01/01/2010"),date())
    = .T.
    Or are you looking for a function like date_is_in_this_year(txdate) to be more specific what is txdate.

  3. #3
    Member
    Real Name
    John Mucci
    Join Date
    Nov 2010
    Location
    New York
    Posts
    313

    Default Re: Code help with Between dates

    Thank you Ray. txdate is a Field in Quick Books which hold the date of entry for each record. regarding the function I want to pull dates from 1/1/2010 to the current date. Hope that helps.

  4. #4
    "Certified" Alphaholic Ray in Capetown's Avatar
    Real Name
    Ray Hendler
    Join Date
    Jan 2009
    Location
    South Africa
    Posts
    2,036

    Default Re: Code help with Between dates

    Your filter will be;
    between(ctod(txdate),ctod("01/01/2010"),date())
    You might check that the user's country date format setting matches txdate and the From date string "01/01/2010"

  5. #5
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,626

    Default Re: Code help with Between dates

    John

    It's actually txndate
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  6. #6
    Member
    Real Name
    John Mucci
    Join Date
    Nov 2010
    Location
    New York
    Posts
    313

    Default Re: Code help with Between dates

    Quote Originally Posted by Al Buchholz View Post
    John

    It's actually txndate
    Al, correct :) Still no luck with the code Ray provided.

  7. #7
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,626

    Default Re: Code help with Between dates

    between.PNGYou also need 3 arguments. Look also at between_date()
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  8. #8
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,626

    Default Re: Code help with Between dates

    Quote Originally Posted by Ray in Capetown View Post
    Your filter will be;
    between(ctod(txdate),ctod("01/01/2010"),date())
    You might check that the user's country date format setting matches txdate and the From date string "01/01/2010"
    Ray, The code was almost right...

    The first parameter is actually the field name that contains the date

    between(txndate,ctod("01/01/2010"),date())

    John and worked on this during the QRB qebinar today and used the expression builder to help us decode it.
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  9. #9
    "Certified" Alphaholic Ray in Capetown's Avatar
    Real Name
    Ray Hendler
    Join Date
    Jan 2009
    Location
    South Africa
    Posts
    2,036

    Default Re: Code help with Between dates

    So Al.
    No cigar, but a wink. Better than nothing.
    Hard to believe how the little mothers can hold things up.
    Thanks for that - its nice to know you're watching.

  10. #10
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,626

    Default Re: Code help with Between dates

    Quote Originally Posted by Ray in Capetown View Post
    So Al.
    Hard to believe how the little mothers can hold things up.
    Amen to that...
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

Similar Threads

  1. Why inline-javascript code fires before ajax callback UDF xbasic code?
    By eritovs in forum Application Server Version 10 - Web/Browser Applications
    Replies: 6
    Last Post: 10-29-2010, 08:46 AM
  2. Convert attached events to code in code tab.
    By SNusa in forum Alpha Five Version 9 - Desktop Applications
    Replies: 1
    Last Post: 02-17-2009, 03:12 AM
  3. Code Editor saved code to wrong script
    By Mike Wilson in forum Alpha Five Version 9 - Desktop Applications
    Replies: 5
    Last Post: 09-22-2008, 03:56 PM
  4. nestle alpha code into java code?
    By Willard in forum Web Application Server v6
    Replies: 6
    Last Post: 01-18-2005, 08:03 AM
  5. No Code in Alpha sports code tab
    By forskare in forum Alpha Five Version 5
    Replies: 5
    Last Post: 01-10-2004, 06:13 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
  •