Quantcast

How to change datetime month format number instead names

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

How to change datetime month format number instead names

Kani-3
How to change datetime month format number instead names

1999-january-29

to

1999-01-29

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How to change datetime month format number instead names

Dave-35
http://php.net/manual/en/function.date.php

On Sun, Dec 20, 2009 at 12:22 AM, kani <[hidden email]> wrote:
How to change datetime month format number instead names

1999-january-29

to

1999-01-29

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How to change datetime month format number instead names

euromark (munich)
do you mean in forms?
or in the index/view?

On 20 Dez., 20:08, Dave <[hidden email]> wrote:

> http://php.net/manual/en/function.date.php
>
> On Sun, Dec 20, 2009 at 12:22 AM, kani <[hidden email]> wrote:
> > How to change datetime month format number instead names
>
> > 1999-january-29
>
> > to
>
> > 1999-01-29
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to [hidden email]
> > To unsubscribe from this group, send email to
> > [hidden email]<cake-php%[hidden email]>For more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How to change datetime month format number instead names

Kani-3
Yes this in views/index.ctp
<?php echo $form->input('neesen_ognoo', array( 'label' => 'Label'
                                    , 'dateFormat' => 'DMY'
                                    , 'minYear' => date('Y') - 2
                                    , 'maxYear' => date('Y') ));?>
output is
2009-january-29

i want to

2009-01-29

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How to change datetime month format number instead names

Kani-3
Cake questions helped me

Solution 'monthNames' => false

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How to change datetime month format number instead names

euromark (munich)
i first thought - you could have looked it up in the manual
but then i checked and: its not in there yet :)

so this is really something that has been hidden in den code

but if you have similar questions the fastest trick out there is:
look it up in the code

$defaults = array('monthNames' => true);
in month() in helpers/form.php

took me 10 seconds
this really speeds up your workflow - especially if you have to wait
for answers for several days etc



On 22 Dez., 04:39, kani <[hidden email]> wrote:
> Cake questions helped me
>
> Solution 'monthNames' => false

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Loading...