Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want the date format to be 'DD-MMM-YYYY' , but no matter what conversion i apply , I am unable to change it.
The format that appears is 'M/D/YYYY' along with timestamp 12:00:00
I tried DATE(DATA_DATE,'DD-MMM-YYYY')AS DATA_DATE in the load script
I also tried to set default date format
SET DateFormat='DD-MMM-YYYY';
None of this seems to work
try this
date(Date#(datefield,'D/M/YYY hh:mm:ss tt'),'DD-MMM-YYYY')
or may be something like this?
DATE(FLOOR(Date#(DateField,'DD-MMM-YYYY')),'DD-MMM-YYYY') AS NEWDATE
What is your Data source?
How about this:
Date(Floor(DATA_DATE)) as DATA_DATE
My data source is Oracle where the standard format is defined as 'DD-MMM-YYYY'
Using Date# gives null result
then try timestamp#() instead of Date#()
1. I picked up DATA_DATE from Oracle, stored in a TEMP table
2. Did resident load on TEMP table , changing the date format
date(DATA_DATE,'DD-MMM-YYYY') AS DATA_DATE
3. Stored in QVD
When I read from this QVD, again the format in my table box appears as M/D/YYYY 12:00:00 AM
hi,
try this :
Date(Date#(SubField(DATEFIELD,' ',1),'D/MM/YYYY'),'DD/MMM/YYYY')
or
Date(timestamp#('1/12/2016 10:35:21 AM','D/MM/YYYY hh:mm:ss tt'),'DD/MMM/YYYY')
Swati, You are saying you are fetching from qvd - So, Would you be able to provide sample
1. I picked up DATA_DATE from Oracle, stored in a TEMP table
2. Did resident load on TEMP table , changing the date format
date(DATA_DATE,'DD-MMM-YYYY') AS DATA_DATE
3. Stored in QVD
When I read from this QVD, again the format in my table box appears as M/D/YYYY 12:00:00 AM
1) How DATE_DATE looking?
2) date(date#(DATA_DATE,'YourDateFieldFormat'),'Required Format') AS DATA_DATE
Then Try