Click here to Skip to main content
15,887,945 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI ALL

pls find my below code. I am using this code for converting the date into my required format. But this take too much of cost and taking too much of time to execute. Can anyone having better idea to do of my task.



VB
(to_char(add_months(SYSDATE,-1),'mmyyyy'),to_char(add_months(SYSDATE,-2),'mmyyyy'),
       to_char(add_months(SYSDATE,-3),'mmyyyy'))



Rgds
Jagadesh
Posted

1 solution

Use TryParse, refer a good answer on CP
how to calculate date only from datetime object[^]
 
Share this answer
 
Comments
Kumar from madras 13-Jun-12 1:32am    
HI PRASAD THANKS FOR YOUR SOLUTION NOW I AM FACING ONE ISSUE IN THE BELOW QUERY I AM GETTING SYNTAX ERROR CAN YOU HELP ME.
select * from d_trxn_perm where load_mmyy in (to_date(month || year, 'mmyyyy')
between add_months(trunc(sysdate, 'MM'), -3)) and trunc(sysdate)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900