when using PHP spreadsheet i have the date set in the correct format but when opening in excel i am unable to filter dates by month / year etc. i have to click on each date select the formula bar and press enter. this then allows me to filter the date.
how can i set phpspreadsheet to do set this correctly ?
i have been searching google for a solution. the limited results i have found seem to point to the same way i have implemented this
Any suggestions?
Thanks
Related
I am using Google Search Console for php to obtain search analytics of my website. I know Google provides data for 90 days, but the end date to that range is not the current date, but usually a couple days prior. Is there a simple way to find the true end date for the data provided? I know I could send requests for recent days and work backwards until a result is returned, but I feel there must be a better way.
The Search Console provides the Search Data 3 days later. So today (20.06.) you see the data from 17.06. You just have to check at what time the data apears. This is form SC to SC a little bit different.
I am using a library called Custom Metaboxes and Fields for Wordpress to add meta data to my custom post types. It's an event website.
I had it all going, but started to have issues with sorting when trying to filter the adjacent_post_links from singe posts.
I figured it might be that I am storing the date in m/d/y and not Y/m/d.
So, i've started over trying to work with a UNIX date timestamp as I have read this is the way to go. Now, I am having issues with my custom wp_queries pulling my filtered posts on the front page. I think it has to do with needing to work with timezones.
Anyways, over the long run, what are the best practices in storing date in mysql? I've also been reading about using STR_TO_Date() to properly format date so that you can order and compare dates if needed. Would this be an option if I went back to dates being stored in m/d/y .
Thanks
If you store dates as Unix timestamps in the database, it 'll gives you lots of trouble because it is not easily readable.for Example(unix format): '1410738238'
if you store as datetime format in the database, it is easy readable efficient and very flexiable,also mysql provides a lot of date functions.for Example(datetime format): '1970-01-01 00:00:01'
for more information http://dev.mysql.com/doc/refman/5.1/en/datetime.html
I am trying to add a Google calendar to a website I'm making that the client will be able to update themselves. I found this: http://mikeclaffey.com/google-calendar-into-html/ which has been quite helpful, but I am a bit stuck.
The website I am building is using PHP template and the page contents is contained within the $content variable. Here is the link I'm working on: http://victoriasawyer.com/AmosTheTransparent.
The calendar feed is the top one of the two lists of Tour Dates. I would like the top one to look similar to the bottom one. The same would be ideal but not necessary.
The biggest issue I'm having is with the start date and time. In the title of the event I would like just the date to show (preferably like 10/03/14) not the time. I have figured out how to display just the time separately without issue. Is there some way to change the date format?
The other issue I'm having is the order that the events are appearing. I would like the events to show with the soonest one first in the list and the furthest one last in the list. I added the additional parameters as instructed in the tutorial (orderby=starttime and sortorder=ascending) but they do not display correctly.
The url I am using is: https://www.google.com/calendar/feeds/qmfadhgtq2kmabsi3dlb456v98%40group.calendar.google.com/public/full?orderby=starttime&sortorder=ascending&futureevents=true&alt=json. Is there something I can adjust or add to fix the order?
Any help will be much appreciated (even if you can recommend an alternative. It just needs to be customizable, and so far this seems to be the best option I have found).
You can use PHP's DateTime class like this:
$date = new DateTime('Sun Nov 16 2014 00:30:00 GMT+0000');
echo $date->format('Y-m-d');
You can then use the predefined formats in PHP which are listed here to format it into whatever style you like.
echo $date->format('d/m');
echo $date->format('d/m/Y');
I need a date picker/selector written in php, jquery and probably mysql that is visible for the user to select a particular date and view the contents for that particular date.
An example can be found here
http://soccernet.espn.go.com/scores/_/league/eng.1/english-premier-league?cc=3888
Another example is http://www1.skysports.com/football/fixtures-results/06-september-2012.
You can use the JQuery UI Datepicker and modify it for your own purposes. There a lot of Date Pickers out there. In this case, Google will probably provide you with more answers than Stack Overflow :)
I am trying to read dd/mm/yyyy date from Excel. It is behaving very inconsistently. At times it adds one day more to the actual date in the cell and at times give the correct date.
The code:
$pdiDate_key = array_search('PDI Date',$excel->sheets[0]['cells'][1]);
Based on your code example, I'm going to guess that you're using PHP-ExcelReader to retrieve the dates from Excel. If I'm right, then, well, there is a known error in Excel that PHP-ExcelReader doesn't handle. The "bug" report is here:
SourceForge.net: PHP-ExcelReader: Detail: 2388545 - Wrong Date
The comments at the bottom of that page include code for a function to fix the error.