Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Bugs & Issues> Call MySQL SUBTIME()
 

Pages: 1
Bugs & Issues
Call MySQL SUBTIME()
Page:1/1 

  Print all messages in this thread  
Poster Message
aaw
User



Location:

Joined on:
17-Jun-2020 17:12:29
Posted:
3 posts
# Posted on: 17-Jun-2020 17:21:36.  
Hello,

How can I call the MySQL SUBTIME() function in LLBLgen?

Kind regards,
aaw
  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14626 posts
# Posted on: 17-Jun-2020 23:58:28.  
You didn't specify which version of LLBLGen are you using, which tenmplateSet and if you are using the Low Level APIs, Linq or QuerySPec.

If you are using the low level APIs, then using a DBFunctionCall
Example:
Code:
new DbFunctionCall("SUBTIME({0}, '1:30')", new object[] {YourEntityFields.TimeField });

This is the Expression that you can use in a filter or in a select as shown in the above link.

For QuerySpec and Linq there is an extra step to define a function mapping.
But if you can convert the time to minutes or hours, then you can use the built-in mapped function AddMinutes() or AddHours() and provide a negative value.


  Top
aaw
User



Location:

Joined on:
17-Jun-2020 17:12:29
Posted:
3 posts
# Posted on: 18-Jun-2020 12:07:33.  
Thank you for your fast response.
I am using version 5.6 of LLBLGen, SelfServicing and Linq.
  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14626 posts
# Posted on: 19-Jun-2020 16:53:59.  
Did you get it sorted out, or do you still need help?

  Top
aaw
User



Location:

Joined on:
17-Jun-2020 17:12:29
Posted:
3 posts
# Posted on: 19-Jun-2020 17:00:42.  
Hello Walaa,

Thank you for your help.
I managed to do it using function mapping.

Kind regards,
aaw
  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.