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

  • Home
  • SEARCH
  • 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 8770467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:33:51+00:00 2026-06-13T17:33:51+00:00

I have a field named VALUE of VARCHAR2 type The string is in this

  • 0

I have a field named VALUE of VARCHAR2 type

The string is in this format: yyyy-mm-dd
Is it possible to change it to: dd-mm-yyyy

An then (again if possible) to convert it to date in this format?

What I have tried is:

SELECT convert(varchar, getdate(), 110)

but it’s only for the current time. Is there a way to do this?

Edit:
Here my code is:

select
p1.VALUE as Sdate
from Process p 
LEFT JOIN PARAMETER p1 on p1.WP_ID=p.ID AND p1.NAME = 'Sdate'
WHERE p.TYPE = 'Marketing' and convert(varchar, convert(date,p1.value), 103) ='22.08.2012'
  • 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-13T17:33:52+00:00Added an answer on June 13, 2026 at 5:33 pm

    104 will convert in dd.mm.yyyy format

    SELECT CONVERT(VARCHAR, GETDATE(), 104)
    

    Your query should be:

    SELECT p1.VALUE AS Sdate
    FROM Process p 
    LEFT JOIN PARAMETER p1 
           ON p1.WP_ID = p.ID 
          AND p1.NAME = 'Sdate'
    WHERE p.TYPE = 'Marketing' 
      AND CONVERT(VARCHAR, CONVERT(DATE, p1.value), 104) = '22.08.2012'
    

    See an example in this SQLFiddle.

    Note that you should keep the column type as DATE where you want to store dates. Also, always prefer yyyyMMdd format.

    Have a look at CAST and CONVERT (Transact-SQL)

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

Sidebar

Related Questions

Suppose I have this annotation @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface Name { String value(); }
Right now, I have a database field named 'PROCESS_FLAG' that contains the text value
I have an input field whose name is an MD5 string e.g.: <input type=hidden
I have four tables like this: mysql> describe courses; +-----------------+-------------+------+-----+---------+----------------+ | Field | Type
I my index lets say I have field field named full_name. I'm doing following
i have table called as Support, which have a field named Name and contains
i have a nvarchar(max) field named PublishTime, which contains the time in HH:MMtt (10:20AM),
I have a table with statistics and a field named time with Unix Timestamps.
I have a ModelForm where one of the field (named creator ) is a
I have a calendar table in my MYSQL database with one field named datefield

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.