Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

change in date format for a particular domain

Hi all,

      I am using date in my application as MM/DD/YYYY.

    But i have a requirement if a user from xxxx domain login he need to see the date format as DD/MM/YYYY in his end.

      i.e user who login with XXXX domain needs to see date in DD/MM/YYYY and rest all in MM/DD/YYYY

Please need help on this.

2 Replies
nagaiank
Specialist III
Specialist III

If OSUser()='xxxx' Then

Set DateFormat = 'DD/MM/YYYY';

Else

Set DateFoprmat = 'MM/DD/YYYY';

EndIf

DIsplay date with the value Date(yourdatefield,'$(DateFormat)')

jagan
Partner - Champion III
Partner - Champion III

Hi Pavan,

Try like this

Create a variable as

vUserDomain = =SubField(OSUser(), '\')

vUserDateFormat = =If(vUserDomain = 'DD/MM/YYYY ', 'MM/DD/YYYY')

Now in all your date dimensions/expressions, listboxes give like this

=Date(DateDimensionName, vUserDateFormat)

Hope this helps you.

Regards,

Jagan.