'AM' or 'PM' in the time format? - fullcalendar

I am trying to modify the default.html demo in full calendar-2.3.2 so that it displays 'AM' or 'PM' in the time format.
All I seem to get is 'A' or 'P' on the calendar displayed.
How do i do this please? I am struggling with the docs somewhat.

I finally found the answer to this myself, should anyone else find themselves in the same predicament:
timeFormat: 'h(:mm)a'
will render as (for example) 7:30pm

Related

PHPExcel - cell formating

if I fill a cell with the value "0.07" and then define it as a percentage, excel turns this value into "7,00". Can someone tell me how to work correctly? thanks
$objPHPExcel->getActiveSheet()->setCellValue($col.$rowCount,'0.07');
$objPHPExcel->getActiveSheet()->getStyle($col.$rowCount)->getNumberFormat()->applyFromArray(array('code' => PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE_00));
if i change and set the value to "0,07" - excel means that the value is formatted as text.
ok, i found a simple solution:
$objPHPExcel->getActiveSheet()->setCellValue($col.$rowCount, 0.07/100);
$objPHPExcel->getActiveSheet()->getStyle($col.$rowCount)->getNumberFormat()->setFormatCode('0.00%');
i am happy if it helps others.

Date filter on SPARQL using R

I am currently writing a block of code on R which collects data via a SPARQL query. My problem is when I am trying to filter the query by date, R gives an error of "unexpected numeric constant".
There is no any mistake in the SPARQL code because when I run the exact code on the endpoint I receive data normally.
You will find the block of code where I have the problem. It does not matter the lines before and after, just the second line of the date filter.
...
OPTIONAL {?seller gr:legalName ?sellerLegalName} .
FILTER REGEX (STR(?date) >= "2015-01-01") .
FILTER NOT EXISTS {?spendingItem elod:hasCorrectedDecision ?correctedDecision} .
...
Please, I would kindly ask for your help! :)
For any further information that you want in order to solve the problem, feel free to contact with me.
Thank you all!!!
SOLVED!
I found that the date should be passed as timestamp!
Also, I found a useful site where you can convert any date in timestamp and vice versa.
I would like to thank you all for your responses and your useful help!
You should filter it as a date/time value rather than as a string - perhaps that will help:
FILTER (?date > "2015-01-01"^^xsd:date)
See this answer: SPARQL date range

ReportBuilder embedded FormatDateTime errors in switch comparator

I have a datetime field that may be blank. when it is not blank I want to show only the date portion. I used:
=FormatDateTime(Fields!myDate.Value, DateFormat.ShortDate)
This works except for blank entries which are replaced by "1/1/0001".
I used a switch statement but it returns an error when the condition is met. The switch statement is:
=switch(Fields!myDate.Value<>"", FormatDateTime(Fields!myDate.Value, DateFormat.ShortDate))
This works for the blanks but yields an error for datetime entries.
The workaround is to change the stored procedure to return only the date for the datetime field. I would prefer to have the time value in case it is needed in the future.
Please let me know what I'm doing wrong or if there is a report builder solution that works.
=IIF(Fields!myDate.Value Is Nothing, "", Format(Fields!myDate.Value,
"dd/MM/yyyy"))
Please mark as duplicate. This is a duplicate answer of my similar question (with Answer by Jeffrey Van Laethem) "SSRS expression fails for IIF date with #error"

Using Eval to check for a particular Date Value

I am trying to set a label in a gridview not to show a particular date if it is returned (it is because it is a default date and is not needed).
The code I have used is
<%# 'Convert.ToString(Eval("DateTaken")).Equals("01/01/1899") ? "" : Eval("DateTaken")'%>
Unfortunately, when I try and compile it the code won't run. I have tried to find an answer by research, but have not been able to do so.
It uses part of Chris's answer, but Equals does not work. Changing this to Contains does when parsing the value as year
<%# 'Convert.ToString(Eval("DateTaken")).Equals("01/01/1899") ? "" : Eval("DateTaken")'%>
This is not valid syntax as far as I am aware. You have single quotes ' wrapping your statement which is likely confusing the parser a lot. I'm not sure what you intend them to be doing but I'd suggest trying without:
<%# Convert.ToString(Eval("DateTaken")).Equals("01/01/1899") ? "" : Eval("DateTaken")%>
I can't test this but it looks like it should work.
Also for the comparison (I assumed you'd tested that elsewhere first) I suspect you may have problems with the fact that Convert.ToString likely includes a time element. Instead I would suggest specifying what string format you want to be outputted. Or even better assuming that it is a DateTime you are getting back compare it as a DateTime. Either of the following should work as a reliable comparison
(((DateTime)Eval("DateTaken")).ToString("yyyy-MM-dd")=="2014-03-05")
(((DateTime)Eval("DateTaken")).Date==new DateTime(2014,03,05))

Trying to parse a file that looks partically hex encoded

I'm trying to parse a file that looks sort of hex encoded but mostly not. I contacted support for the vendor who created the file and they said that they it can be parsed using "an 0x116 offset"
What is a 0x116 offset?
It took me 2 weeks to get an answer from the vendor on my first question, so I wanted to see if someone here could help me make sense of! Thank you!
"0x116 offset" means nothing. It could be a value that needs to be added to words or subtracted to remove some naive encoding, or anything else for that matter.
Could you post a part of the file? Is it binary or text? Could you define "mostly not"?
What vendor/software package/device does this file come from?

Resources