Hi everyone,

I am a new comer to Stata.

Currently, I have issues with converting some imported data from Excel to Stata.

For the variable "totalvalue" I have tried the following commands:

Code:
gen totalvalue_2 = real(totalvalue)

and 

destring totalvalue, generate(totalvalue_n)

but, the generated variable is empty.


For the date variable, I have tried the following commands:

Code:
generate maturedate_2 = date(maturedate,"DMY")
    format %tdDD/NN/CCYY maturedate_2

and

generate issuedate_2 = date(maturedate,"DMY")
    format %tdDD/NN/CCYY issuedate_2

for both variables "maturedate" and "issuedate", but the generated variables are also empty.

Anyone could please advice?

Thanks in advance!

Please kindly find the following -dataex- for your reference.

Royyan

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str14 bondid str19 totalvalue str10(issuedate maturedate)
"GBRB0012MyBV" " 3,044,631,010 "  "28-May-99" "25-Sep-07"
"SOFN01A"      " 9,009,000,000 "  "9-Mar-06"  "9-Mar-08" 
"SOFN01C"      " 1,001,000,000 "  "9-Mar-06"  "9-Mar-09" 
"SOFN01B"      " 2,002,000,000 "  "9-Mar-06"  "9-Sep-08" 
"INDF02XXBFTW" " 6,156,204,000 "  "10-Jun-03" "10-Jun-08"
"CSFC01XXBFTW" " 4,494,394,450 "  "2-Oct-03"  "2-Oct-06" 
"CSFC01XXBFTW" " 8,954,343,000 "  "2-Oct-03"  "2-Oct-06" 
"INDF02XXBFTW" " 11,486,865,600 " "10-Jun-03" "10-Jun-08"
"ULTJ03"       " 14,397,170,044 " "8-Apr-04"  "8-Apr-07" 
"ULTJ03"       " 6,019,722,667 "  "8-Apr-04"  "8-Apr-07" 
end