I am using CONCATENATE funciton to group data in a cell in which i have to include date and timestamp. i need to run some batches of data in my database as part of my daily routine. i need the date and timestamp at most importantly as that will help in minimizing my work load.
DATA
CELL A3: 2012-07-31 18:00:00
CELL B3: (521976, 521977, 521978, 521979)
FORMULA: =CONCATENATE(“update tbl_content_master set start_date='”,A3,”‘ where content_id in “,B3,”;”)
RESULT: update tbl_content_master set start_date=’41121.75’ where content_id in (521976, 521977, 521978, 521979);
ISSUE
FROM FORMULA start_date='”,A3,”‘ i.e. 2012-07-31 18:00:00 (date with time stamp)
FROM RESULT start_date=’41121.75’ i.e. 41121.75 (decimal format)
PRESENT RESULT: update tbl_content_master set start_date=’41121.75′ where content_id in (521976, 521977, 521978, 521979);
REQUIRED RESULT: update tbl_content_master set start_date=’2012-07-31 18:00:00′ where content_id in (521976, 521977, 521978, 521979);
use the TEXT function: TEXT(cell w/date, “format string“)