Return to Snippet

Revision: 12043
at February 28, 2009 16:22 by troynt


Updated Code
select
evTitle as 'name',
concat(description,"\n",url) as description,
CASt(CONCAT(CAST(startDate as char),' ',cast(startTime as CHAR)) as datetime) as dtstart,
CASt(CONCAT(CAST(endDate as char),' ',cast(endTime as CHAR)) as datetime) as dtend,
evVenue as location,
evAddress as street,
evCity as city,
evState as state,
cast(NOW() as datetime) as modified_at,
cast(dateEntered as datetime ) as created_at,
'1' as author,
'127.0.0.1' as author_ip
from FTDevents;

Revision: 12042
at February 28, 2009 16:21 by troynt


Initial Code
INSERT INTO wp_ce_events ( name, descwp_ce_eventsftrnorg_ftdayription, dtstart, dtend,location,street,city,state,modified_at,created_at,author,author_ip )
select
evTitle as 'name',
concat(description,"\n",url) as description,
CASt(CONCAT(CAST(startDate as char),' ',cast(startTime as CHAR)) as datetime) as dtstart,
CASt(CONCAT(CAST(endDate as char),' ',cast(endTime as CHAR)) as datetime) as dtend,
evVenue as location,
evAddress as street,
evCity as city,
evState as state,
cast(NOW() as datetime) as modified_at,
cast(dateEntered as datetime ) as created_at,
'1' as author,
'127.0.0.1' as author_ip
from FTDevents;

Initial URL


Initial Description


Initial Title
Convert Date Field and Time field to DateTime

Initial Tags


Initial Language
MySQL