For Programmers: Free Programming Magazines  


Home > Archive > Clarion > March 2006 > time deformatting









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author time deformatting
CFCUG President

2006-03-04, 6:55 pm

Hello.

I have a 32 character string field that contains a date and time.

I have used the below listed statement to parse out the time.

SIGW:TimeReceived =
DEFORMAT(LEFT(CLIP(SUB(SEH:DateTimeRecei
ved,TimeZonePos# - 5,5))),@T1)

If I display (SEH:DateTimeReceived,TimeZonePos# - 5,5) the values look
like this
8:30 or 10:45. When I deformat it, I get 0.

Any ideas?

JMumf

2006-03-04, 6:55 pm

Do it in multiple steps and verify what you are deformating.

DateString" =LEFT(CLIP(SUB(SEH:DateTimeReceived,Time
ZonePos# - 5,5)))
!PUTINI to see what is in DateTime"
Deformat(DateString",@T1)

Also it may need to be Right justified not LEFT..

JMumf

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com