{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"Guides","type":"markdown"},"seo":{"title":"Setting the TD Import Time Format for a Windows Batch File","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"setting-the-td-import-time-format-for-a-windows-batch-file","__idx":0},"children":["Setting the TD Import Time Format for a Windows Batch File"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you need your date data formatted a certain way so that it works well with Treasure Data there are ways that you can do so. Particularly, if you are importing CSV formatted data on Windows and doing a batch import, you can add the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--time-format"]}," parameter to your import statement. For Example:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bat","header":{"controls":{"copy":{}}},"source":"td import:prepare --format csv --column-header --time-column 'date' \\\n--time-format '%%Y-%%m-%%d' t  \n","lang":"bat"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["%"]}," is a recognized environment variable, so you must use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["%%"]}," to set it."]}]},"headings":[{"value":"Setting the TD Import Time Format for a Windows Batch File","id":"setting-the-td-import-time-format-for-a-windows-batch-file","depth":1}],"frontmatter":{"seo":{"title":"Setting the TD Import Time Format for a Windows Batch File"}},"lastModified":"2025-10-20T01:51:42.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/tools/cli-and-sdks/setting-the-td-import-time-format-for-a-windows-batch-file","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}