473,395 Members | 1,986 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

convert 'Apr 19 20:00:03 CDT 2009' string to date

hi ,

i am unable to convert'Apr 19 20:00:03 CDT 2009' which is a string to a valid date format plz let me know the function
May 19 '09 #1
2 3099
Try this... but I am not sure whether it will work....
select date('Apr 19 20:00:03 CDT 2009')
from sysibm.sysdummy1
Jul 18 '09 #2
docdiesel
297 Expert 100+
Hi,

that won't do. The string must be in one of the following formats:
  • "2009-06-25-16.12.30.000000"
  • "2009-06-25"
  • "25-06-2009"
Try to chop and rearrange the string by using substr() and maybe replace() for the month' name.

Regards


Doc
Jul 21 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Jitender Kumar C | last post by:
Hi, I want to extract date part (mm/dd/yy or any other date format) of Timestamp in postgreSQL. Can anyone help me out?. Regards, Ch.V.J. Kumar |Associate Consultant | iGATE Global...
7
by: Darryn Ross | last post by:
Hi, I am trying to convert an integer into a string but when i do i loose some of the integer... e.g int i = 10.00 ; string s ; s = Convert.ToString(i) ;
5
by: simon | last post by:
I have datetime variable: Datetime tsEndTime; Should I use (DateTime): tsEndTime=(DateTime)rdr.GetValue(15) or is better to use: tsEndTime=Convert.ToDateTime(rdr.GetValue(15))
5
by: Steel | last post by:
Hi at all it is the first time that I use PHP and I need only to modify the last modified date of a file I maked a FIRST little script like this: $FileName="myfile.txt"; $Today...
7
by: Stimp | last post by:
I want to output a number, say 20, as 20.00 i.e. I want to always have 2 decimal places I don't want any currency information, therefore String.Format("{0:c}") doesn't work for me. Can't...
2
by: remya1000 | last post by:
How to convert UTC formate time to local time.using vb.net. In my application in some point of the execution i need to retrieve a date,but instead of date i get some numbers,for example...
8
reginaldmerritt
by: reginaldmerritt | last post by:
I'm in the process of planning out a database that can organise our staff bookings. Basically having the ability to link staff to certain clients at chosen periods of time. For example...
0
by: deloford | last post by:
Hi This is going to be a question for anyone who is an expert in C# Text Encoding. My situation is this: I have a Sybase database which is firing back ISO-8559 encoded strings. I am unable to...
10
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I convert a Number into a String with exactly 2 decimal places?...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.