- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Specified cast not valid for datetime while using SAP RFC
I think you better use the ParseExact method available over DateTime type. It should work.
Please find the code snippet for reference −
string dateFormat = "dd.mm.yyyy hh:mm:tt"; DateTime finalDate = DateTime.ParseExact(argumentDate, dateFormat, CultureInfo.InvariantCulture);
Advertisements