Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have been storing date format in meta key/value. I have been storing in this format (mm/dd/YYYY) now I need to convert that into (YYYYMMDD) SO I can run a date match in query.

Please advice how can I do that ?

share|improve this question
    
It depends on how many dates you're talking about. If it's just a few, change them manually via PHPMyAdmin. If it's a lot, run a query in PHPMyAdmin or write a PHP script to do it. Either way, this isn't strictly a WP question. –  vancoder Apr 11 '13 at 2:56
    
yes, I realized after I posted here that this can be done via sql query or php script. However, I have a custom field that accepts date (done by someone else) When you click on that a small calendar pops up and upon click on a date it saves in wrong format. How can I fix format of that ? So It will save date in correct format subsequently. –  Hassan Z Apr 11 '13 at 4:07
    
You will need to post the code that saves the calendar data. –  s_ha_dum Apr 11 '13 at 4:13
    
Please provide additional information with code or if you are using any plugin then link to that plugin. –  Vinod Dalvi Apr 11 '13 at 4:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.