Click here to Skip to main content
15,881,204 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using ajax calender extender for picking datetime...

The format I am using is..
Format="MM/dd/yyyy hh:mm:ss tt"

Here I need PM by default in time part

But the above format will give AM always by default..

For example I need to set date like '12/02/2013 08:00:00 PM' by default

Currently am getting '12/02/2013 08:00:00 AM

How to solve ...Pls help me


Thanks in advance
Posted
Updated 1-Dec-13 20:09pm
v2

u just change ur column datetime data type as "DATE"..u can use thiz script for picking a date
HTML
<script>
    $(function () {
 
        $("#From_date").datepicker({ dateformat: "yy-mm-dd" }).val()
    }
);
</script>
 
Share this answer
 
v4
Comments
kanamala subin 2-Dec-13 6:01am    
I am using TextBox for from and two dates...
So how can i use this code..?
Please explain
[no name] 2-Dec-13 6:19am    
The script u write on the source code..below i wrote my date picker program
XML
<script>
    $(function () {

        $("#From_date").datepicker({ dateformat: "yy-mm-dd" }).val()
    }
);

</script>
<script>
    $(function () {
        $("#To_date").datepicker({ dateformat: "yy-mm-dd" }).val()
    }
);
</script>




from text box u can change ur id name as "From_date" and to textbx vice versa
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900