Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 878779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:49:07+00:00 2026-05-15T11:49:07+00:00

I want to cast a date into ISO format, and use it as a

  • 0

I want to cast a date into ISO format, and use it as a string in an expression in SSIS.

This is what I type in T-SQL

select convert(varchar(8), GetDate(), 112)

and this is what I get back

20100630

My goal – is to create an archive folder based on the date. I have the File System Task part of creating a folder sorted, I can do that … I just need to be able to Cast the date to a string, so I can use that.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T11:49:07+00:00Added an answer on May 15, 2026 at 11:49 am

    You’ll need to add an expression:

    RIGHT((DT_WSTR, 4) DATEPART("yyyy", GetDate()), 4) + 
    RIGHT("0" + (DT_WSTR,2)DatePart("mm", GetDate()), 2) + 
    RIGHT("0" + (DT_WSTR,2)DatePart("dd", GetDate()), 2)
    

    This expression will create the result that you are after.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to reinterpret cast a function pointer into a void* variable. The type
empty (not null!)I want to create sql statement as this: SELECT * FROM table
Select CONVERT(Date, '13-5-2012') When i run the above T-SQL statement in Management Studio, i
Basically i want to do this. aa causes a bad cast exception. NOTE: o
I want to select the value between the date Table1 Code Period Datefrom dateto
CAST() seems to only work for BINARY,CHAR,DATE;DATETIME,DECIMAL,TIME,SIGNED,UNSIGNED. I need to convert a hex string
I want to cast a specific column in my PostgreSQL database from character_varying type
I want to convert a varchar value that iI set up to a date
I hav the next query in SQL: SELECT id FROM student WHERE DATE LIKE
I want to convert a datetime field into a numeric representation in form of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.