» Home » strtotime » Page 1
PHP strtotime bug?
by krs in Programming Languages

Take a look at this code and please tell me how is it possible that this works flawlessly for Wednesday, but not for Tuesday:


<?php
$current_time = strtotime('now');
if ($current_time > strtotime('tuesday this week 8:45pm') && $current_time < strtotime('tuesday this week 11:45pm')) {
$background = 1;
}
if ($current_time > strtotime('
TAGS : strtotime

php strtotime() some help
by tolis626 in Programming Languages

I am taking credit card details and I am taking the expiration date in two form field, one for the expiration month and one for the expiration year, I am wanting to store the expiration date as timestamp. Will strtotime("05/2010") create a time stamp or do I need to pass a day as well or is there an alternative?


Thanks


Other uses of strtotime() in PHP
by Gipsy.D in PHP

I'm trying to get strtotime to make Date Ranges, I've already figured it out for some of the basic ones.


Here's some that i'm trying to figure out but I can't find the format that you're supposed to type anywhere online for these ones:


$startDate = strtotime('first day of last month');
$endDate = strtotime('last day of last month');
$startDate = strtotime('f

How do I strtotime in python?
by nchaimov in Coding

I'm scraping a a page that includes among other things, date information. So I have a variable named warrant_issued that contains u'11/5/2003' -- I want to store this as a machine readable date. PHP has a handy strtotime function that works fabulously. I was hoping that datetime's strptime would help me but it doesn't seem to be available in my version of

TAGS : strtotime python

PHP's strtotime() in Java?
by Puffnstuff in Java

I'm looking for an easy way to generate a MySQL DATETIME from any type of time input a user may enter. PHP makes it easy with its strtotime() function that can do:


strtotime(’2004-02-12T15:19:21+00:00′);


strtotime(’Thu, 21 Dec 2000 16:01:07 +0200′);


strtotime(’Monday, January 1st’);


strtotime(’tomorrow’);


strtotime(’-

TAGS : strtotime Java

PHP strtotime() outputs nothing
by Icyflash in Coding

Here is my PHP code:


echo '<br />1. '.$w_time_no;
echo '<br />2. '.strtotime($w_time_no);
echo '<br />3. '.date('G:i', strtotime($w_time_no));

That's what I get:


1. 0000-00-00 22:00:00
2.
3. 2:00

Why strtotime() outputs nothing by itself? Is there something wrong with server settings? S


PHP: Problems using strtotime
by ack in Programming Languages

I want to filter my output:


07-02-13 20:08:41 test11@gmail.com
07-02-13 20:09:41 test11@gmail.com
07-02-13 20:21:25 hottie@gmail.com
07-02-13 20:56:51 ugly@gmail.com
07-02-13 21:42:37 selma532@gmail.com
07-02-13 22:09:11 blalbla421@gmail.com

I want to filter my output, so emails there appearing within 2 minutes has to do s


php strtotime issues
by amelim in Programming Languages

Okay, I understand this:


mm/dd/yyyy - 02/01/2003 - strtotime() returns : 1st February 2003
mm/dd/yy - 02/01/03 - strtotime() returns : 1st February 2003
yyyy/mm/dd - 2003/02/01 - strtotime() returns : 1st February 2003
dd-mm-yyyy - 01-02-2003 - strtotime() returns : 1st February 2003
yy-mm-dd - 03-02-01 - strtotime() returns : 1st
TAGS : strtotime issues

PHP : YYYY-MM-DD vs. strtotime
by yodude7 in Databases

May I have some opinions on inserting data into MySQL for later comparison. I know that those format date(Y-m-d) and strtotime(date(Y-m-d)) have its own specific kinda usage. But I'm new to the field of mysql and PHP. So I need a list of pros and cons of use among you guys. Which one are you using and please give me a little why.


Do you prefer using date(Y-m-d) or strtotime(date(Y-m

TAGS : YYYY strtotime

PHP - strtotime, specify timezone
by Simon Capewell in Coding

I have a date string, say '2008-09-11'. I want to get a timestamp out of this, but I need to specify a timezone dynamically (rather then PHP default).


So to recap, I have two strings:


$dateStr = '2008-09-11';
$timezone = 'Americas/New_York';

How do I get the timestamp for this?


EDIT: The time of day will be the midni


Next
Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .