Date/Time
10 posts by 2 authors in: Forums > CMS Builder
Last Post: August 17, 2009 (RSS)
By design9 - August 6, 2009
I am importing some old articles into the system and some of my articles are dated back to 2005, 2006 etc. I noticed that the date/time field only goes back to 2008. Is there anyway to change this so I can have 2005 and up?
Also, when I imported the articles in...the date never went in and it defaulted all the articles to jan 1, 2008. This is not as important but is there a way to make it show the dates that I imported into the database?
Thanks!
April
Re: [apdance9] Date/Time
By Chris - August 6, 2009
In the field editor, it is possible to adjust the Year Range of a "date/time" field to handle dates before 2008. Are you using your own date field, or the "created" system field?
Can you explain exactly how you did this import? There should certainly be a way to get your dates to work properly!
Chris
Re: [chris] Date/Time
By design9 - August 6, 2009
I am using the "created" system field. Is there a way to adjust that?
For the import, all the old data was in a asp database (they are moving to php). I exported all of that data out into a csv file, updated my csv file to reflect my columns, etc. in the cms_articles table in the php database and then imported the csv file into the php databse. I use a software called SQL manager for MYSQL to import my data into the database.
Thanks!
April
Re: [apdance9] Date/Time
By Chris - August 11, 2009
CMS Builder uses the MySQL DATETIME field type for created fields, which supports a range of '1000-01-01 00:00:00' to '9999-12-31 23:59:59'. I suspect something went wrong with your import. Perhaps you got the format of the date wrong? Can you post an example line from your CSV file?
Chris
Re: [chris] Date/Time
By design9 - August 17, 2009
So, do I need to change them so they display: 2006-01-01 00:00:00 ?
Also, can you tell me how I can I can change the dates in the date/time field in the backend to go back to at least 2005? Currently the selection is only 2008 and greater.
Thanks!
April
Re: [apdance9] Date/Time
By Chris - August 17, 2009
So, do I need to change them so they display: 2006-01-01 00:00:00?
Yes, that's correct. There are a variety of ways to do this. The simplest is to open your file in a spreadsheet editor (e.g. Excel) and change the format of your date column.
Currently the selection is only 2008 and greater.
Which field(s) have this limitation on what dates can be selected?
Chris
Re: [chris] Date/Time
By design9 - August 17, 2009
Thanks!
April
Re: [apdance9] Date/Time
By Chris - August 17, 2009
As I mentioned earlier in this thread, in the field editor, it is possible to adjust the Year Range of a "date/time" field to handle dates before 2008.
Admin > Section Editor > modify your section > modify your date/time field. The very first option there is "Year Range".
Chris
Re: [chris] Date/Time
By design9 - August 17, 2009
Thanks!