c# - Convert DateTime to string according to Oracle Format Mask -


there oracle db api function expects input string representing date (or in other cases number) formatted provided format mask.

before went , implemented oracle format mask parser thought ask whether there .net built-in or third party way of converting datetime .net object string using oracle format mask?

update

examples:

datetime date = datetime.now; string converteddate = convertdatetimetooracleformattedstring (date, "month dd, yyyy"); // should produce: march 21, 2014 converteddate = convertdatetimetooracleformattedstring (date, "cc bc"); // should produce: 21 // other valid oracle format combination: http://docs.oracle.com/cd/b19306_01/server.102/b14200/sql_elements004.htm#i34924  

my current idea parse provided oracle format mask equivalent .net custom date , time format string: http://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx , use when converting .net datetime string: datetime.now.tostring ("equivalentdotnetformat");. equivalent .net format of "month dd, yyyy" "mmmm dd, yyyy". unless there quicker approach.

could please take @ odp .net?

i believe has necessary classes provide functionality desire.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -