Hi,
I have to show system date in custom format
For example: 2009/Oct/06
I want to show date in above format. how to get this output .
i used the below format -
$months = array(1 => "Jan", 2 => "Feb", 3 => "Mar", 4 => "Apr", 5 => "May", 6 => "Jun", 7 => "Jul", 8 => "Aug", 9 => "Sep", 10 => "Oct", 11 => "Nov", 12 => "Dec");
-
-
$raw_date = date("Y/m/d");
-
list($year, $month, $day) = split('[/]', $raw_date);
-
$date = $year . "/" . $month . "/" . $day;
-
But i struck how to apply that array format in this format?
Can any one help me how to get the custom format date using php.
Thanks in advance
Regards,
4 3488 @Dormilich
in date("Y/M/d") function i am getting output as 2009/10/06.
but i want date in 2009/Oct/06. this format.
How to get this?
thanks in advance
Regards,
@phpmagesh
you probably wrote "Y/m/d" since "Y/M/d" resulted in the desired output (I tested that!)
@cestapassu
well, obviously. haven’t you looked at date()’s formatting options? (that’s about three dozen letters)
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Dario Di Bella |
last post by:
Hi all,
we have the following urgent issue affecting our development team.
Initially we had one particular workstation that failed executing
queries on a DB2 database, raising an invalid date...
|
by: stevag |
last post by:
I want to convert a custom date format of the type DD/MM/YYYY into the
RFC 822 date format in order to use it for RSS feeds. I want to do this
transformation into an XSLT transformation which is...
|
by: Rob T |
last post by:
I'm storing a date/time into a SQL table of type datetime. I need it to be
precise so the value is stored to the 1000th of a second. ie "insert into
myTable mydate values ('08/05/2005...
|
by: Rich |
last post by:
Hello,
I have some datefields in a dataset (ds1). I bind some
textbox controls on a windows form to these date fields in
ds1, but I only want to see 01/01/2004 instead of 1/1/2004
8:00:00 AM. ...
|
by: z. f. |
last post by:
HI,
i have string in format
dd/mm/yyyyy hh:mm:ss
and giving this as an input to DateTime.Parse gives a string was not
recognized as a valid date time format string error.
how do i make the parse...
|
by: Robin Tucker |
last post by:
I'm using the date/time picker to allow users to choose a date or a time.
However, as the control modes only allow one or the other, I'm scratching my
head as to how to allow the one control to...
|
by: Niclas |
last post by:
Hi,
I want to display a date in UK format (dd/MM/yyyy) and am using a culture
info object for this. using
Convert.ToString(MyDate, _CultInfo)
works fine, besides that the string includes the...
|
by: Darin |
last post by:
I have an applicatoin that works 100% perfect when running on a machine
setup for English (United States), but when I change it to Spanish
(Mexico), the dates start giving me fits.
THe reason is...
|
by: Claes Wedin |
last post by:
My customer needs a DateTimePicker in VS2005 C# that can show emty date
values (blank/space/null).
I need a control that:
1. Can show a blank value
2. Detete a date when hitting the delete...
|
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: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |