Forum Discussion

Taylor_Pack's avatar
Taylor_Pack
Occasional Contributor
16 years ago

Date format

I am importing data from an xls sheet. One of the columns is a date. For the request I have to pass that date value in the format of YYYY-MM-DD. When it is imported as a datasource it always changes the format to DD MM YYYY. The request cannot use that value. How can I get around that?

4 Replies

  • Chas_Schley's avatar
    Chas_Schley
    Occasional Contributor
    In your xls sheet, select the column containing your dates, Format -> Custom, type 'yyyy-mm-dd' into the Type box. Save your sheet. In the datasource step, import the first 10 records to verify format. Hope that helps!
  • Taylor_Pack's avatar
    Taylor_Pack
    Occasional Contributor
    Sorry, I didn't say in my previous post that no matter what format I change the date to in the xls it is imported into SoapUI into the DD MM YYYY format. I am using Open Office on Ubuntu also but saving the file in s 97/xp xls version. I don't know if that may be the issue.
  • Taylor_Pack's avatar
    Taylor_Pack
    Occasional Contributor
    The request needs the date in the format of:
    2007-07-13T20:06:00.000-05:00
    2007-07-13 (will work too)

    When I import the data from xls it is always in the format of:
    13 07 2006 12:00:00

    I am inserting the value in the request through the datasource with a ${date_source#Date}