Hopefully an easy one. Can someone please supply me with the code for
displaying the previous month?
I do not want just -3 from December for October. It needs to work each
month without modifying.
Many thanks
Sam 10 15949 sa*****@hotmail.com wrote:
Hopefully an easy one. Can someone please supply me with the code for
displaying the previous month?
I do not want just -3 from December for October. It needs to work each
month without modifying.
Many thanks
Sam
Sam,
I'm not sure what you're asking for. Can you clarify this a little more?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attglobal.net
==================
On 5 Nov, 12:57, Jerry Stuckle <jstuck...@attglobal.netwrote:
samh...@hotmail.com wrote:
Hopefully an easy one. Can someone please supply me with the code for
displaying the previous month?
I do not want just -3 from December for October. It needs to work each
month without modifying.
Many thanks
Sam
Sam,
I'm not sure what you're asking for. Can you clarify this a little more?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================
Jerry,
I am looking for a simple piece of PHP code that will write the
previous month in full.
So for example, if it was used now, it would display the text
'October'.
If it was used in April, it would display 'March', etc.
Sorry I wasn't very clear.
Thanks
Sam sa*****@hotmail.com wrote:
On 5 Nov, 12:57, Jerry Stuckle <jstuck...@attglobal.netwrote:
>samh...@hotmail.com wrote:
>>Hopefully an easy one. Can someone please supply me with the code for displaying the previous month? I do not want just -3 from December for October. It needs to work each month without modifying. Many thanks Sam
Sam,
I'm not sure what you're asking for. Can you clarify this a little more?
-- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstuck...@attglobal.net ==================
Jerry,
I am looking for a simple piece of PHP code that will write the
previous month in full.
So for example, if it was used now, it would display the text
'October'.
If it was used in April, it would display 'March', etc.
Sorry I wasn't very clear.
Thanks
Sam
OK, maybe something like:
echo date("F",strtotime("-1 month"));
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attglobal.net
================== sa*****@hotmail.com wrote:
On 5 Nov, 12:57, Jerry Stuckle <jstuck...@attglobal.netwrote:
>samh...@hotmail.com wrote:
>>Hopefully an easy one. Can someone please supply me with the code for displaying the previous month? I do not want just -3 from December for October. It needs to work each month without modifying. Many thanks Sam
Sam,
I'm not sure what you're asking for. Can you clarify this a little more?
-- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstuck...@attglobal.net ==================
Jerry,
I am looking for a simple piece of PHP code that will write the
previous month in full.
So for example, if it was used now, it would display the text
'October'.
If it was used in April, it would display 'March', etc.
Sorry I wasn't very clear.
Thanks
Sam
Nope, that one fails on March 31st, for instance.
How about :
echo date("F",strtotime(-date('j') . ' days'));
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attglobal.net
==================
On 5 Nov, 14:42, Jerry Stuckle <jstuck...@attglobal.netwrote:
samh...@hotmail.com wrote:
On 5 Nov, 12:57, Jerry Stuckle <jstuck...@attglobal.netwrote:
samh...@hotmail.com wrote: Hopefully an easy one. Can someone please supply me with the code for displaying the previous month? I do not want just -3 from December for October. It needs to work each month without modifying. Many thanks Sam
Sam,
I'm not sure what you're asking for. Can you clarify this a little more?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================
Jerry,
I am looking for a simple piece of PHP code that will write the
previous month in full.
So for example, if it was used now, it would display the text
'October'.
If it was used in April, it would display 'March', etc.
Sorry I wasn't very clear.
Thanks
Sam
Nope, that one fails on March 31st, for instance.
How about:
echo date("F",strtotime(-date('j') . ' days'));
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================- Hide quoted text -
- Show quoted text -
Seems to work fine. Many thanks for your help.
Greetings, Jerry Stuckle.
In reply to Your message dated Monday, November 5, 2007, 17:42:13,
echo date("F",strtotime(-date('j') . ' days'));
Another piece of ***:
date('F', mktime(1, 1, 1, date('m')-1, 1, date('Y')));
;)
--
Sincerely Yours, AnrDaemon <an*******@freemail.ru>
AnrDaemon wrote:
Greetings, Jerry Stuckle.
In reply to Your message dated Monday, November 5, 2007, 17:42:13,
>echo date("F",strtotime(-date('j') . ' days'));
Another piece of ***:
date('F', mktime(1, 1, 1, date('m')-1, 1, date('Y')));
;)
Yours fails in January.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attglobal.net
==================
On 5 nov, 13:22, samh...@hotmail.com wrote:
Hopefully an easy one. Can someone please supply me with the code for
displaying the previous month?
I do not want just -3 from December for October. It needs to work each
month without modifying.
Many thanks
Sam
The PHP manual gives some solutions. Maybe this one will work: http://nl3.php.net/manual/nl/function.mktime.php#53662
Greetings, Jerry Stuckle.
In reply to Your message dated Tuesday, November 6, 2007, 08:28:20,
AnrDaemon wrote:
>Greetings, Jerry Stuckle. In reply to Your message dated Monday, November 5, 2007, 17:42:13,
>>echo date("F",strtotime(-date('j') . ' days'));
Another piece of ***:
date('F', mktime(1, 1, 1, date('m')-1, 1, date('Y')));
;)
Yours fails in January.
Check it before posting such silliness.
<?php
echo date('D d F, Y', mktime(1, 1, 1, 0, 1, 2007));
?>
Intended answer:
Fri 01 December, 2006
--
Sincerely Yours, AnrDaemon <an*******@freemail.ru>
AnrDaemon wrote:
Greetings, Jerry Stuckle.
In reply to Your message dated Tuesday, November 6, 2007, 08:28:20,
>AnrDaemon wrote:
>>Greetings, Jerry Stuckle. In reply to Your message dated Monday, November 5, 2007, 17:42:13,
echo date("F",strtotime(-date('j') . ' days')); Another piece of ***:
date('F', mktime(1, 1, 1, date('m')-1, 1, date('Y')));
;)
>Yours fails in January.
Check it before posting such silliness.
<?php
echo date('D d F, Y', mktime(1, 1, 1, 0, 1, 2007));
?>
Intended answer:
Fri 01 December, 2006
Indeed, keep being an asshole. You're good at it.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attglobal.net
================== This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: eddie wang |
last post by:
How to convert a month to previous month in a very easy way? For
example, I have AUGUST, but I want JULY to return.
Thanks.
*** Sent via Developersdex http://www.developersdex.com ***
Don't...
|
by: Ray via SQLMonster.com |
last post by:
Hi there,
See if you can help me with the following:
I need to write an SQL code that will return me:
The 1st day & the Last day of the Previous Month in the following format...
|
by: Finlay |
last post by:
Hi Group
I am designing a report that should show a meter reading for each
month and the previous meter reading for the previous month. The
months are text stored in a field tMonth.
The...
|
by: ryangus |
last post by:
I simply wish to place the name of the last month (prior to the current
month) on a report.
I've tried using =Month(now())-1, which returns the numerical value as
10, but I cannot get it to...
|
by: TB |
last post by:
HI, is there a formula(function) you could use to the display the
previous month's name in a report. i know there is a
function(formula) that returns the previous month's value (ie 4 for
the...
|
by: brymcguire |
last post by:
Hi,
I have a requirement to design a query that identifies items sold
between two dates. There is a 'SoldDate' datetime field used to
register what date the item was sold.
The query needs...
|
by: Massimo30 |
last post by:
Looking for answers and have done a search in books and websites and still can't find the answer:
I am setting up a Market Trend DB on housing figures. I have the following fields in my table:
My...
|
by: marlberg |
last post by:
Platform: Windows2000, WindowsXP, Windows Vista, etc
Language: C#, ASP.NET
Pre-compiled Libraries: Enterprise Library 3.0 full
I have a requirement to implement in and display in C# and...
|
by: zandiT |
last post by:
Hello
i have a query with two date fields General.Date and Finance.Date. i would like the date in Finance.Date to be previous month of General.Date. So for example if General Date is in the month...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |