cancel
Showing results for 
Search instead for 
Did you mean: 

Need to change the date format from MM/DD/YYYY to YYYYMMDD

yashcp
Active Participant
0 Kudos

Hi All,

I have a requirement in which I need to change the date format from MM/DD/YYYY to YYYYMMDD format. I checked it in control panel settings but

this setting is not available. Moreover, the Format in HANA Calcualtion view is YYYYMMDD, but when it comes to Bex it is changed to MM/DD/YYYY?

Can somebody advise me on this?

Regards,

Yash Parikh

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Yash,

If you are running the Bex report in Bex Analyzer,then it always take the date format as per client system(local running system) date format.

You can change the date format of local running system with date format YYYYMMDD and run this report in Bex Analyzer,you can see the date as per your require format.

Regards,

Rajesh

yashcp
Active Participant
0 Kudos

Hi Rajesh,

Thank you for the reply.

Are you talking about the control panel settings changes?

Moreover, my question is that if I can see the correct date format in other field why not in this field?

Former Member
0 Kudos

Hi Yash,

Yes i am talking about the date format in Local running system. And check the Data type of HANA calculation view field.It should be in date data type.

Regards,

Rajesh

yashcp
Active Participant
0 Kudos

Hi Rajesh,

i checked the data types for both the field in Calculation view

For
Release Date there is not datatype

While for,

Requisition date: the data type mentioned is "DATS" and its associated with Info-object "0calday"

yashcp
Active Participant
0 Kudos

one more thing I can change it a view level, but i do not want to disturb the view. So is there any possibility to change at query level?

Former Member
0 Kudos

Hi Yash,

Query displays the date format as defined in the source structure. changing the date format at query level is not possible .

and for the release date , the date format might have defined some where inside the view as YYYYMMDD.

requisition date of type DATS , even though its format is YYYYMMDD-->this will change according to the user profile format.

did you try changing the date format at user level (su01) ? and see the report output?

yashcp
Active Participant
0 Kudos

Hi Jyothi,

I have attached the file for which the date formats are available. Can you please let me know which one to use, as i could not find YYYYMMDD format. Moreover, are you sure that we cannot write customer exit at query level?

Regards,

Yash Parikh

Former Member
0 Kudos

Hi,

sorry, this format is not available in SU01, and also not sure if customer exit work for this scenario.  any way you can give a try and see if it works.

split the date like below(I am giving just a psudo code) in the customer exit

example:  MM/DD/YYYY - YYYYMMDD (if cal day is mapped to requesition date)

   A1  = SOURCE_FIELDS-calday+0(4) . ** YYYY

   A2 = SOURCE_FIELDS-calday+0(2).  **MM

    A3= SOURCE_FIELDS-calday+2(2).  ** DD

 

  Concatenate A1 A2 A3  into requesition date


     result = requestion date.


and finally append it.

former_member186316
Participant
0 Kudos

Hi Yash,

We can write customer exit for this date format issue .You can take psuedocode which was suggested by Jyothi .

--Ganapathi

Loed
Active Contributor
0 Kudos

Hi,

The format of date is really in YYYYMMDD but you see it in the format MM/DD/YYYY because that's the configured view format on your username..

Check your username in SU01 and find the date view format something and change it to YYYYMMDD..

Regards,

Loed

yashcp
Active Participant
0 Kudos

Hi Loed,

Thanks for your reply...

Yes i did check it in SU01 the date format is in DD.MM.YYYY. So can you please let me know how to proceed on this?

Former Member
0 Kudos

Hi Yash,

if you are authorized to change the user details from SU01, then you can change it by your own.

from the date format drop down, choose your desired format.

but please bear in mind, this format will effect for all queries as you are changing it on user profile level.

if you don't have access, then ask basis to change the format.

yashcp
Active Participant
0 Kudos

Hi Jyothi,

I further gigged it and found that this field uses the standard info object 0calday. Moreover, i have couple of other date fields "release date" in the same report whose format is YYYYMMDD. When i checked info -object "release date" in rsa1, the date format is set as YYYYMMDD. Now i am not sure that do i need to change at info-object level or at query level?

Former Member
0 Kudos

Hi Yash,


YYYYMMDD is BW standard date format , it is same for any infoobject of type date .


if the date format in user profile is different than above, then that users can see the date format as per his/her profile . 

but from your first post, I understood that you need to change the format only for this report? or for all reports assigned to any particular user? please tell us you requirement in detail

Loed
Active Contributor
0 Kudos

Hi,

As Jyothi said, just choose the DATE format you wanted in the drop down..It will be your VIEW for dates on all reports..

Regards,

Loed

yashcp
Active Participant
0 Kudos

Hi Jyothi/Loed,

Ok let me explain

There are three fields in user's report

Two of them are "Release date"  and their Date format is YYYYMMDD

Now the third one is Requisition date in the same report, but here the format is MM/DD/YYYY.

So, how can it be possible that two dates show the format that user is looking for i.e. YYYYMMDD and the third one shows MM/DD/YYYY?

Please let me know in case of more inputs required from my end

Former Member
0 Kudos

Hi Yash,

Two of them are "Release date"  and their Date format is YYYYMMDD

how can it be possible? report wont allows same object twice .  might be a typo?


ok, now coming to requisition date, how is it appearing when you run the report? we need to check if this issue is only for a specific user? or multiple? or for all?


Moreover, the Format in HANA Calcualtion view is YYYYMMDD, but when it comes to Bex it is changed to MM/DD/YYYY?


do you have any mapping between HANA calculation view and Bex report?

yashcp
Active Participant
0 Kudos

Hi Jyothi,

I have attached the excel for your reference. Yes there are two release date columns, but the functionality of both are different

Moreover, the Format in HANA Calcualtion view is YYYYMMDD, but when it comes to Bex it is changed to MM/DD/YYYY?


Yes, this is also true.



do you have any mapping between HANA calculation view and Bex report?


No ther e is no mapping between Calc view and Bex report.





anshu_lilhori
Active Contributor
0 Kudos

The infoobject for requisition date should be of type char of length 8 instead of DATS data type.

Then by default the data will be stored as yyyymmdd and will be displayed in same format as well.

Regards,

AL

yashcp
Active Participant
0 Kudos

Hi Anshu,

Yes, but it takes 0calday, and it only has DATS as data type. So i guess I should opt for Customer exit at query level, as Jyothi suggested with Pseudo code, any inputs?

Regards,

Yash Parikh