Recently I got an opportunity to work on date field calucation in Siebel.I came to know that most of the Siebel developers are not aware of these calcualtions.
In this post I am going to list down some commonly used date calcuation's in Siebel.Most of the date calculations can be done accurately by using Julian functions in Siebel.Julian functions only take Today() or Date field name as parameter.
I am going to explain the below scenario's by taking [Birth Date] in Contact Business component as reference.
To test below scenario's go to Contact Form Applet in Siebel Call Center application and create predefined queries.
- Scenario 1: Query to extract the contacts who celebrated their bithday in previous month.
JulianMonth([Birth Date]) = JulianMonth(Today()) - 1
- Scenario 2: Query to extract the contacts who are going to celebrate their bithday tomorrow.
JulianDay([Birth Date]) = JulianDay(Today()) + 1
- Scenario 3: Query to extract the contacts who celebrated their birthday in Last 6 months.
JulianMonth([Birth Date]) >= JulianMonth(Today()) - 6
- Scenario 4: Query to extract the contacts who celebrated their birthday in current year.
JulianYear([Birth Date]) = JulianYear(Today())
- Scenario 5: Query to retrive current month number.
currentMonth = JulianMonth(Today())-JulianYear(Today())*12
The above mentioned queries can be used in PDQ's(Pre defined queries) and in Search specification property.
Hope this helps !!!
-Ram
Hi,
How do you query for the currentDate number from [Birth Date]?
Thank you!