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 8232709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:55:13+00:00 2026-06-07T17:55:13+00:00

I am trying to convert a string into Date using Derived column and I

  • 0

I am trying to convert a string into Date using Derived column and I am using Flat File Source.
I read bunch of articles on stackoverflow and followed the same steps but I am unable to convert my string into date format.

Here is the string

Tue Nov 25 17:32:03 EST 2008

And I want to show it like

2008-nov-25

I tried using the following code

(DT_DBDATE)(SUBSTRING(dateCreated,24,4) + "-" + SUBSTRING(dateCreated,4,3) + "-" +    SUBSTRING(dateCreated,8,2))

I also tried to use

  (DT_DATE)(SUBSTRING(dateCreated,24,4) + "-" + SUBSTRING(dateCreated,4,3) + "-" +    SUBSTRING(dateCreated,8,2))

  (DT_DBTIMESTAMP)(SUBSTRING(dateCreated,24,4) + "-" + SUBSTRING(dateCreated,4,3) + "-" +    SUBSTRING(dateCreated,8,2))

Is this the correct way to convert the string into date format?

  • 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-06-07T17:55:14+00:00Added an answer on June 7, 2026 at 5:55 pm

    I dont think its possible to display the in the format of yyyy-mon-dd as per BOL. I checked your expression and after minor changes, was able to make it to work. You cannot typecast your string into a string again (You want month name in your output). Even if you were to use the DATEPART function, it would again amount to concatenating different parts into a string.

    The expression that works with your input is as follows (replace @dateCreated with whatever you want to).

    SUBSTRING(@[User::dateCreated],24,5) + "-" + SUBSTRING(@[User::dateCreated],4,4) + "-" + SUBSTRING(@[User::dateCreated],8,3)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to convert the String \something\ into the String \\something\\ using replaceAll ,
I am trying to convert a HTML string into a .PNG file. Thanks to
I am trying to convert java.util.Date into string as Twenty Sixth of October Nineteen
I'm trying to convert a string into money format using this function , and
I am trying to convert string into NSDate using following code. NSString *old =
I'm trying to convert an amount of seconds into a formatted string using midp
I'm trying to convert this string 0x00009F0900000000 into a date either through MySql or
I'm trying to convert a date string into an age. The string is like:
I'm trying to convert a string into a date format My string looks like
I am trying to convert a string into date time format. DateTime.Parse(tempfrmBankDetails.dgvBankDetails.SelectedRows[0].Cells[PaymentDate].Value.ToString(),null); This is

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.