~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/date.cc

Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
#include <sstream>
32
32
#include <string>
33
33
 
 
34
namespace drizzled
 
35
{
 
36
 
34
37
 
35
38
/****************************************************************************
36
39
** Drizzle date type stored in 3 bytes
97
100
   * and matches on datetime format strings can occur.
98
101
   */
99
102
  ASSERT_COLUMN_MARKED_FOR_WRITE;
100
 
  drizzled::DateTime temporal;
 
103
  DateTime temporal;
101
104
  if (! temporal.from_string(from, (size_t) len))
102
105
  {
103
106
    my_error(ER_INVALID_DATETIME_VALUE, MYF(ME_FATALERROR), from);
133
136
   * if unable to create a valid DateTime.  
134
137
   */
135
138
  ASSERT_COLUMN_MARKED_FOR_WRITE;
136
 
  drizzled::DateTime temporal;
 
139
  DateTime temporal;
137
140
  if (! temporal.from_int64_t(from))
138
141
  {
139
142
    /* Convert the integer to a string using stringstream */
275
278
{
276
279
  res.set_ascii(STRING_WITH_LEN("date"));
277
280
}
 
281
 
 
282
} /* namespace drizzled */