How to get the current date format for the repository..??

durgesh_sahu
durgesh_sahu Member
edited December 13, 2012 in Documentum #1

Hii guys,

i have a requirement where i need the current time or date format like (MMM dd yyyy  OR  MM/dd/yyyy HH:mm) which has been set 

for the repository on content server. I have been through the dfc api , but still not able to find any methods providing relevant information regardig this.

Is there is any way through which we can get this information.

Thanks

Tagged:

Comments

  • msroth
    msroth Member
    edited December 12, 2012 #2

    Can't you just get it from Java?

    import java.util.Date;
    now = new Date();

  • KSMatson
    KSMatson Member
    edited December 12, 2012 #3

    You can also do this

    select datetostring(DATE(NOW), 'mm/dd/yyyy hh:mi:ss') as formated_date from dm_server_config;

  • durgesh_sahu
    durgesh_sahu Member
    edited December 13, 2012 #4

    Thanks Scott from replying, i have tried that but it dosen't work.

  • durgesh_sahu
    durgesh_sahu Member
    edited December 13, 2012 #5

    Thanks Khurram for replying,

    i tried the query you have given, but it returns the current date in the format we provide,not the pattern which is on the server. Actually i want to format the date i am getting through value assistance for the date type attribute,

    thats why i want to know in which format the date value is coming through value assistance.

    Is there a way we can do that.

    Thanks

  • JorgKrause
    JorgKrause Member
    edited December 13, 2012 #6

    Hi,

    as far as I know, there is no date_format stored in the repository anywhere!

    If you retrieve a date field without any pattern, it will automatically be formatted according to the local settings of your session, which indeed depend on settings on your PC.

    You may add patterns while retrieving dates, either through Java or DQL. See IDfTime javadocs for further details on the available patterns.

    Regards

    Jørg