SQL Agent tokens problem

  • I am trying to use SQL Agent tokens to specify the output file name within a SQL Agent job, for example:

    F:\SQLLogs\Daily_Batch_$(ESCAPE_SQUOTE(STRTDT))_$(ESCAPE_SQUOTE(STRTTM)).log

    However the STRTTM and TIME tokens are not producing HHMMSS output as expected, the hour component has leading zeros omitted.

    Does anyone know of a way to configure this?

  • is this what you are looking for:

    msdb.dbo.agent_datetime($(ESCAPE_SQUOTE(STRTDT)), $(ESCAPE_SQUOTE(STRTTM)))

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply