How to find last date of the month in IBM app connect? - datetime

Usually you can get this using LAST_DAY in esql but in app connect it's not working anyone has any idea on how to get last day of the month using esql in app connect?

I solved the problem I used intervals to get the next month then set the next month's date value to 1 and use interval again to get the day before, which will be the last date of the month in question.
Basically I checked the next month and got next month's 1st date which will always be 1 then got the day before that which will always be the last date of current month.

Related

fullcalendar wrong timespamp for midnight

I am using fullcalendar.io and I realized that if I create a new event in the month view, dragging across one or more days, it returns a timestamp for the end date which is later rendered as 12 am of the day after while it should be logic that a function date("what-ever-format", timestamp) returns 12 pm of the current day, or, in any case, not the following day.
Any idea how to fix this???

How to get a weekly report of changes in Jira

We are using Jira for a Kanban board and our manager wants a weekly report of all the changes in the last week.
Can I generate this from Jira?
You can use simple date calculation to retrieve Issues that have been updated in the last week
This will return all issues that were updated since the beginning of the current week.
updatedDate > startOfWeek()
If you want to see the last 7 days from the current date, use
updatedDate > startOfDay(-7d)

Telerik RadDatePicker not picking up dates post year 2030

I am using RadDatePicker control for start and end date input controls on my form.
I am taking "01/01/1980" as min date and "12/31/2049" as max date. I am facing a problem when I enter the date manually in Date text box.
Scenario 1: I enter date as 123129. RadPicker correctly picks it up as 12/31/2029 and displays the formatted date value.
Scenario 2: I enter date as 123130. I get a client side validation warning. No matter what day and month I enter, it freezes every time on year greater than XX/XX/29 (2029).
Scenario 3: I enter date as 12312030 - complete year instead of just last 2 digits. RadPicker correctly picks it up as 12/31/2030 and displays the formatted date value.
I tested all 3 scenarios on ASP.NET Calendar Demo - DatePicker - First Look as well.
I am not sure why the validation kicks in even when the max date is set as 12/31/2049. Please assist me in resolving this issue.
Thanks,
Vaibhav
"The years starting from 30 and greater are parsed as 19.. like if u say 30th(year) it would get it like 1930, 123130 will be parsed as 12/31/1930. this is invalid because the default value of the MinDate i.e. 1/1/1980.
In Order to solve this set the ShortYearCenturyEnd property of the DateInput to 2099.
Hope i answered the question.

How to create only a week calendar with previous and next week buttons

I am really stucked at this.what i want is that there should be 6 table cells in which i should have days with date. like
Monday 4/3/2013 Tuesday 5/3/2013 and so on till saturday
.i have two more buttons,previous week and next week button.. it should automatically show next week when i click the next week button and should show the previous week whenever i press the previous button..
also the i need to take the value of days/month and year so that i can use them in where clause in my sql query..pls its urgent can anyone help me with this...
im providing a link you can see what exactly i want by visiting this link
www.test.ginormous.in/dinesmart/Filestore/Food/Capture.png
i am just giving you the outline as posting the whole code is not possible.
create an asp:panel in your aspx page
try generating the table structure dynamically inside that panel by writing myPanel.innerhtml = "(your html structure generated in a string)"
use theDate.AddDays(7 - (int)theDate.DayOfWeek) to get the date for this weeks sunday.(where theDay is the current date or the date given by you and change 7 to 6 if you want it for monday as this returns date for sunday etc..)
on previous and next click you can add or subtract 7 days from the first day of the weel that is generated above.
hope this helps you.

Drop Down Date Delivery

I want to use a asp.net drop down to present the user a delivery date on checkout. What I'm not sure about is how to get the specific dates. What the user should see and be able to select in the drop down is the next Monday and Tuesday for the next two weeks. Any help would be appreciated.
thanks.
The simplest solution is to use the DateTime.DayOfWeek property (http://msdn.microsoft.com/en-us/library/system.datetime.dayofweek.aspx).
You start with getting today's date, or, if today is Monday and you can't deliver for two days, so the next delivery will be a week Monday, then start with tomorrow. I am not certain how you would handle if I order tomorrow could I get a delivery date for the next day, so I would need that clarified.
Get the day of the week, starting with either today or tomorrow, extracting it from a specific date as explained here:
http://msdn.microsoft.com/en-us/library/system.datetime.dayofweek.aspx
If it isn't Monday or Tues then just determine how many days you need to reach Monday or Tuesday, then add that number of days and get that date, and then just add seven and get the date.
I would prefer to let .NET determine the date of seven days from now, as you may change month or years.
That is the basic approach. If you get stuck when trying to implement it, I would suggest some code so we can help you determine where you got stuck.
There are other approaches, but this is probably the simplest to understand and implement.
Here's a pretty simple suggestion using a lot of LINQ:
private void LoadDeliveryDays(int period)
{
DateTime[] days = Enumerable.Range(1, period).Select(i => DateTime.Today.AddDays(i)).ToArray();
DropDownList1.DataSource = (from d in days where d.DayOfWeek == DayOfWeek.Monday | d.DayOfWeek == DayOfWeek.Tuesday select d.ToString("dddd dd-MM-yyyy")).ToArray();
DropDownList1.DataBind();
}
You probably want to change the d.ToString("dddd dd-MM-yyyy") and/or what value is actually used in the dropdown.

Resources