Closed (fixed)
Project:
Date
Version:
5.x-2.0-rc
Component:
Date API
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
1 May 2008 at 08:59 UTC
Updated:
25 May 2008 at 07:11 UTC
i'm using date module and create a date field using CCK
then i write some codes in php file to read it from the datebase
i found it's a string like"2008-05-14T19:30:00 "
how can i convert it to "2008-05014 19:30:00",for example?
i tried date_format or date_show_value...they didn't work.
thank u very much
Comments
Comment #1
HorsePunchKid commentedI'm having the same issue. It just came up after updating to the 5.x-2.x-dev version from 2008-04-30. Not sure yet why this happened, but it appears to be very problematic.
Comment #2
HorsePunchKid commentedBack up your tables first. This helped me:
update {your_cck_table} set field_{your_field} = replace(field_{your_field}, ' ', 'T'), field_{your_field}2 = replace(field_{your_field}2, ' ', 'T')Comment #3
karens commentedThis is not a bug report and certainly not critical.
Assuming you're getting the value from the database where it is stored as a UTC value, and you want to display it in the site's timezone, do something like:
Comment #4
HorsePunchKid commentedIt's a bug in the sense that something was working and then was no longer working after an update (which exactly I'm no longer sure). It seemed that at some point something went from expecting a space in the date string to expecting a T in the date string. It is certainly critical in the sense that no data was being displayed anymore. Perhaps I should have adjusted the title to clarify.
After updating to the latest dev version, my events have all disappeared from the calendar again, but the cause must be different this time.
Comment #5
karens commentedThe issue is a question about how to convert an ISO date in the database to the datetime version. How is that a bug? What are you talking about that is no longer working? I'm completely confused by this issue.
Comment #6
karens commentedIf you're not seeing dates after your update, that's a completely different issue that could have a number of causes, so open a different issue and explain that more completely -- what kind of dates did you create? Where are they not showing up? In the node? In a View? If so, in what View?
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.