Posted: Thu Dec 09, 2010 2:39 am Post subject: Formatting Date info retrieved from Datebase to a string
Apprentice
Joined: 18 Nov 2010 Posts: 49
I am trying to do a substring a date value retieved from DB and getting error while running it.
I am retrieving a attibute from DB which is of type DateTime in SQL DB.
I need to retrieve only year and month information from the date.
My code looks like this :
DECLARE dateStr3 CHARACTER;
SET dateStr3 = (CAST TransactionRef.RIR_EndDate as CHARACTER format 'yyyMM');
--where TransactionRef.RIR_EndDate is DateTime retrieved from DB
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum