Method Community

 

SQL Now(), DateDiff() function

Last post 04-11-2016 11:38 AM by Method_Ben. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 03-20-2015 11:50 AM

    SQL Now(), DateDiff() function

    Hi Method,

    For SQL override, does Method system support Now() and DateDiff() function? I'm trying them but the grid always show "Error Generating Grid".

    Thanks.

    --

    Alex

    Chief Architect
    Yi Systems, Inc.
    alexhuang@yisystems.com
    www.yisystems.com blogs.yisystems.com
    Software.Web.Cloud.IT
  • 03-20-2015 3:53 PM In reply to

    Re: SQL Now(), DateDiff() function

    Answer

    Hi Alex,

    SQL Overrides are outside the scope of what we can really provide help with here on the forums, but you could try using GETDATE(). I'm not 100% certain if it will work, but you can give it a shot.

    If you'd like to go over some more advanced customization concepts, you would likely benefit from booking some time with a member of our Professional Services Team. Let me know if that interests you and I'll have your account manager follow up.

    Hope this helps.

    - Justin

    Justin Henderiks
    Technical Sales Specialist
    Method Integration Inc.
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400
    Fax: 416.640.6027
    E-mail: j.henderiks@method.me
  • 04-09-2016 10:38 PM In reply to

    Re: SQL Now(), DateDiff() function

    I was painstakingly working on this and found that if you use the convert function that it displays the format of the date you want and also allows the grid to not have issues.

    CONVERT(varchar(10), GETDATE (), 101)


    I did find that GetDate() is working where now() and today() does not work.
    Peace!

    CONVERT(varchar(10), GETDATE (), 101)

  • 04-11-2016 11:38 AM In reply to

    Re: SQL Now(), DateDiff() function

    Thanks for the post bergyver.

    Definitely a handy reference to have. Im sure lots of people will benefit from this!

    -Ben

    Ben Hargreaves
    Senior Support Specialist
    Method:CRM
    b.hargreaves@method.me
    Toll Free: 1.888.925.6238
    Local & Overseas: 416.847.0400
    Fax: 416.640.6027
Page 1 of 1 (4 items)