Alpha DevCon 2018
Results 1 to 6 of 6

Thread: Date question

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

    Default Date question

    Hello All,

    Is it possible to just replace the second date with something that will read today's date().
    I have this as an operation. The below is the SQL statement.

    sp_report TrialBalance show AccountFullName, AccountHasChildren, AccountListID, AccountName, AccountNumber, AccountSpecialType, AccountType, Credit, Debit, Label, NumColTitleRows, NumColumns, NumRows, ReportBasis, ReportSubtitle, ReportTitle, RowData, RowDataType, RowNumber, RowType Parameters DateFrom = {d'2012-01-01'}, DateTo = {d'2012-04-10'}

    John

  2. #2
    Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,429

    Default Re: Date question

    John

    vcgQBEnd_Date="{d'"+dtoc(date(),"12-")+"'}"

    sql="sp_report TrialBalance show AccountFullName, AccountHasChildren, AccountListID, AccountName, AccountNumber, AccountSpecialType, AccountType, Credit, Debit, Label, NumColTitleRows, NumColumns, NumRows, ReportBasis, ReportSubtitle, ReportTitle, RowData, RowDataType, RowNumber, RowType Parameters DateFrom = {d'2012-01-01'}, DateTo = "+vcgQBEnd_Date

    Use that in an Alpha DAO import
    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.

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

    Default Re: Date question

    Thank you Al

    I tried the above however getting an error.

    Could not create ResultSet from DataSource definition.
    Last edited by jtm311; 04-03-2012 at 06:39 AM.

  4. #4
    Member
    Real Name
    John Mucci
    Join Date
    Nov 2010
    Location
    New York
    Posts
    265

    Default Re: Date question

    Al sorry I didn't see the line to make it a Alpha ADO. I have now created that connection. If I then use this connection in the operation I get the following error.
    untitled.JPG
    John

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

    Default Re: Date question

    Quote Originally Posted by jtm311 View Post
    Al sorry I didn't see the line to make it a Alpha ADO. I have now created that connection. If I then use this connection in the operation I get the following error.
    untitled.JPG
    John
    Alpha DAO and ADO are 2 different choices.

    Build an import operation using Alpha DAO and apply the code to the SQL statement..
    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
    265

    Default Re: Date question

    Al I wrote ADO (sorry) but that error is when creating a Alpha DAO import operation.

Similar Threads

  1. Date Calculation question
    By tkursht in forum Application Server Version 10 - Web/Browser Applications
    Replies: 0
    Last Post: 05-14-2010, 03:18 PM
  2. Year from Date Question
    By Scott_S in forum Alpha Five Version 8
    Replies: 14
    Last Post: 10-23-2008, 04:19 AM
  3. Yet another Date question
    By golferman53 in forum Alpha Five Version 7
    Replies: 4
    Last Post: 11-02-2005, 10:10 PM
  4. question on DATE
    By ken tjia in forum Alpha Five Version 4
    Replies: 8
    Last Post: 06-10-2000, 06:09 AM
  5. date validation question
    By eeetee in forum Alpha Five Version 4
    Replies: 3
    Last Post: 05-22-2000, 02:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •