You can convert your 18 digit Salesforce ID to 15 digit using the String method. The below example will show how to use,
- String str = '0019000001O73UCAAZ';
- String convertedStr = str.subString(0, 15);
- System.debug('15 digit ID:'+convertedStr);
However, Salesforce recommends that you use the 18-character ID.
Reference: Field Types