Set Study date and Time to current Date and Time

  • There is an equipment whose date, time settings are off and looks like vendor is unable to sort it out.


    Been trying out a few tricks to set date/time of incoming studies to current date/time but it has been unsuccessfully.


    I guess I can change Study date/time while leaving series and instance date/time to, say, a day in the future without any issues. This way, at least users will find their studies for the day by searching "Today"


    Any ideas on how to do this?


    Thanks.

  • Hi,


    Lua has the power to format the date and time. try something like this:


    [lua]
    Association = dofile("date.lua")
    ImportConverter0 = -- code to set date gets here


    where data.lua comes from:


    LuaDate v2
    Lua Date and Time module for Lua 5.x.
    Jas Latrix


    and then used functions in there to set date and time.


    Marcel

  • Thanks Marcel for your quick response.


    I am yet to figure out how to use Lua. Was hoping for a solution outside lua. If that is not possible/easy I guess I will live with the issue. Not a very big deal. Users just have to remember to search for the next days date.


    Regards.

  • Hi


    There is a script option to get the date/time, but it is returned in a non DICOM compliant format. So without Lua you would a new release. I can add it to the feature list. But I prefer a Lua solution because the old script options are much less flexible.


    regards,


    Marcel

  • Thanks Marcel.
    I actually noticed that the script options were returning date formats that were not accepted or had to be truncated etc.
    I guess it would be of value to incorporate non-lua way in future releases. However, you can consider it based on need/requests. Personally i intent to learn lua some day and this particular issue is not very critical for now.


    Regards.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!