473,407 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Date in custom format

119 100+
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
Expand|Select|Wrap|Line Numbers
  1. $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");
  2.  
  3. $raw_date = date("Y/m/d");
  4. list($year, $month, $day) = split('[/]', $raw_date);        
  5. $date = $year . "/" . $month . "/" . $day;
  6.  
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,
Oct 6 '09 #1
4 3488
Dormilich
8,658 Expert Mod 8TB
what about
Expand|Select|Wrap|Line Numbers
  1. date("Y/M/d")
?
Oct 6 '09 #2
phpmagesh
119 100+
@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,
Oct 6 '09 #3
Dormilich
8,658 Expert Mod 8TB
@phpmagesh
you probably wrote "Y/m/d" since "Y/M/d" resulted in the desired output (I tested that!)
Attached Images
File Type: jpg date.jpg (19.2 KB, 138 views)
Oct 6 '09 #4
Dormilich
8,658 Expert Mod 8TB
@cestapassu
well, obviously. haven’t you looked at date()’s formatting options? (that’s about three dozen letters)
Oct 6 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

6
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...
0
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...
12
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...
1
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. ...
50
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...
2
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...
4
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...
21
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...
2
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...
0
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
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
Oralloy
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,...
0
jinu1996
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...
0
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...
0
tracyyun
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...
0
agi2029
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.