472,354 Members | 2,150 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,354 software developers and data experts.

How to convert user-defined custom format date string to date value

I write an application which can let user define own date format to input,
How to convert the date string to date value with end-user defined date

Example, User Defined Date Format as "dd/MM/yyyy"

input as "01082003" convert to date value as, 01 Aug 2003

Example, User Defined Date Format as "yyyy,dd,MM"

input as "2004,03,30" convert to date value as, 30 Mar 2004

Example, User Defined Date Format as "MM dd yyyy"

input as "05 07 2005" convert to date value as, 07 May 2005

Assumption: I cannot change regional language settings, because some PCs may
also use by several users whom have use own faviour date format.
Nov 21 '05 #1
1 4488

This should work:

DateTime.ParseExact(InputString, UserDefinedFormat,



Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Closer | last post by:
I am new to XML and XSL, could someone please help? I have my XML and XSL files and can view the XML file with the stylesheet in my browser. Everything is fine. What I want to do is to...
by: Logan X via .NET 247 | last post by:
It's official....Convert blows. I ran a number of tests converting a double to an integer usingboth Convert & CType. I *ASSUMED* that CType would piggy-back ontop of Convert, and that performance...
by: | last post by:
Hey I am calling Convert.ToDouble(someString); But this double can have to ways or representing doubles dependant on the locale, it can be 1.0 or 1,0 Is there a way to make...
by: ACaunter | last post by:
Hi, can someone please let me know if there is a way to convert a vb.net application to asp.net. Or if a vb.net application written in 3-tier could be run on the net??? Thanks! --...
by: egoldthwait | last post by:
I need to convert a 17mb access 2000 db to Oracle and house it in a Citrix farm. The issue: we have never converted an Access Db to Oracle but can probably use Oracle's Workbench to assist with...
by: csanjith | last post by:
Hi, i have a situaion where i need to convert the characters entered in an text field to upper case using C. The configuration id utf8 environment in which user can enter any character (single ,...
by: Jim Andersen | last post by:
I am going to build a webapp. Our users are not allowed to download certain files, so I need to show files in a directory (.doc, .ppt, ???) and the user can then convert them to PDF and download...
by: Kathi215 | last post by:
hi, i`m wowrking in project that accept user input from swtiches(on /off) which is binary and then i have to display that number in lcd via maicrocontroller.I'm using c interactive language.My...
by: Carl K | last post by:
I need to take the take the pdf output from reportlab and create a preview image for a web page. so png or something. I am sure ghostscript will be involved. I am guessing PIL or ImageMagic ? ...
by: WPW07 | last post by:
Hello, We have several complex applications developed in Access 2003 by various outside consultants. These applications link to a variety of Oracle tables and are used only for Access reports. ...
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made but the http to https rule only works for...
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. header("Location:".$urlback); Is this the right layout the...
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it so the python app could use a http request to get...
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.