0

enter image description here

In Excel i am using following formula :-

="Select Count(1) Into Count1 From TRB_TPOAR Where tpo_id='" & A2 & "' and eta_id=old_eta_id and date_creation=to_date('" &  B2 & "','dd/mm/yyyy HH24:MI:SS') and UTL1_EDS_ID='DEI037';
    if Count1>0 then
     Update TRB_TPOAR Set Eta_id=new_eta_id Where tpo_id='" & A2 & "' and eta_id=old_eta_id and date_creation=to_date('" & B2 & "','dd/mm/yyyy HH24:MI:SS') and UTL1_EDS_ID='DEI037';
     DBMS_OUTPUT.PUT_LINE('" & A2 & "'  UPDATED'); 
    end if;"

In excel sheet Column B contains datetime information(eg 1/14/2013 12:20:01 PM), But when i apply the formula,it adds some other numeric value.Can anyone help me,what are the changes to make in above formula?

pnuts
  • 58,317
  • 11
  • 87
  • 139
F11
  • 3,703
  • 12
  • 49
  • 83

1 Answers1

2

In your case, Excel returns the serila number of the date in referenced cell. To make sure it returns a string dispaying the date in the format you want, use =TEXT(cell, FormatString).
E.g.: TEXT(C2, "dd/mmm/yy")
Bonne chance

iDevlop
  • 24,841
  • 11
  • 90
  • 149