more help needed on converting - sorry
Sorry but it is me again still struggling with changing tables
I have now converted my Character filed into a date field (thanks to you
all !)
I now need to do the following: -
I have another character field that holds times i.e. 123045, what I am trying
to do is have a date time field.
So how can I use my date field and the character field and put these together
and have a date time field for the whole table?
Many thanks in advance, and hopefully this will be the last question on this,
as the entire table will be converted!
Paul
# 1 Re: more help needed on converting - sorry
Hello, Paul!
You wrote on 28 Apr 2003 06:26:25 -0800:
PS> I now need to do the following: -
PS> I have another character field that holds times i.e. 123045, what I am
PS> trying to do is have a date time field.
PS> So how can I use my date field and the character field and put these
PS> together and have a date time field for the whole table?
PS> Many thanks in advance, and hopefully this will be the last question on
PS> this, as the entire table will be converted!
something like this?
* assume existing date field = "ddate"
* assume existing time char field = "ctime"
<vfp_code>
* add datetime field "tdatetime"
ALTER TABLE yourtable ADD COLUMN tdatetime T
REPLACE ALL tdatetime WITH ;
DATETIME(YEAR(ddate), ;
MONTH(ddate), ;
DAY(ddate), ;
VAL(LEFT(ctime, 2)), ;
VAL(SUBSTR(ctime, 3, 2)), ;
VAL(RIGHT(ctime, 2)))
</vfp_code>
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8
# 2 Re: more help needed on converting - sorry
Paul Summerfield <pjsummerfield@hotmail.com> inscribed in
news:3ead2c01$1@tnews.web.dev-archive.com ...
> ... hopefully this will be the last question
Hi Paul,
Ask as many questions as you need to!
--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy.winegarden@mvps.org http://cindywinegarden.adsl.duke.edu
http://msdn.microsoft.com/vfoxpro http://foxcentral.net
# 3 Re: more help needed on converting - sorry
Many thanks,
table is all now in order
paul
"Cindy Winegarden" <cindy.winegarden@mvps.org> wrote:
>Paul Summerfield <pjsummerfield@hotmail.com> inscribed in
>news:3ead2c01$1@tnews.web.dev-archive.com ...
>> ... hopefully this will be the last question
>
>Hi Paul,
>
>Ask as many questions as you need to!
>
>--
>Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
>cindy.winegarden@mvps.org http://cindywinegarden.adsl.duke.edu
>http://msdn.microsoft.com/vfoxpro http://foxcentral.net
>
>