Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a list of dates like the following, how can i turn them to DD-MM-YYYY ?
8112010
9112010
10112010
11112010
Hi,
try this
Date(Datefield, 'DD-MM-YYYY') as Date
Regards
REnjith
Try with
date(date#(<your date>,'DMMYYYY'),'DD-MM-YYYY')
Try as follows....
DATE(MAKEDATE(LEFT(DateFeild,2),MID(DateFeild,3,2),RIGHT(DateFeild,4))) as NEW_DATE
Thanks for the suggestions. BUT, the problem i have here is the date is not full 8 digits
some are 7 some are 8. thats the problem...
Actual Answer:
if(len( Start_Date )='7', date(date#(Start_Date,'DMMYYYY'),'DD-MM-YYYY'), date(date#(Start_Date,'DDMMYYYY'),'DD-MM-YYYY') )
MMmmmm that's the problem..
Guess this will work .. Just try and see ( I didn't try )
If left(DateFeild,2)<=12,DATE(MAKEDATE(LEFT(DateFeild,2),MID(DateFeild,3,2),RIGHT(DateFeild,4))),DATE(MAKEDATE(LEFT(DateFeild,1),MID(DateFeild,3,2),RIGHT(DateFeild,4)))) as NEW_DATE
Sorry nicksatch for the misunderstanding on string length.
I would suggest you an easier way to manage it.