It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

Need Help to parse date for desision making.

Moderator: dafunkymunky

Need Help to parse date for desision making.

Postby gregbems on Sat Jun 04, 2005 9:45 pm

I collect data from third party application using SOAP. This data consists of values and dates of associated data. I can gather the data with out any problem. Based on the date gathered, i need to decide which excel spread sheet to use, IE jan, feb etc... and which column to use for the many data items. All this revolves around the date from the third party that is gathered.

Can someone show me how to parse out the month, or day to a new variable(s) so i can use them to make these decisions?
gregbems
 
Posts: 0
Joined: Sat Jun 04, 2005 9:29 pm
Location: Md

Postby Fang Lunin on Mon Jun 06, 2005 2:11 am

well im not sure if the date that your dealing with is the same, but if you want the month/day/whatever of NOW or a date in the same format, just go
Month(Now) or Day(Now) or Minute(Now)...exc, if you just do Now you'll get the full date and you can use that in your program to see if how the dates your dealing with and the Now date is in the same format.

Hope that helps.
Fang Lunin
 
Posts: 9
Joined: Fri May 13, 2005 8:49 am

Postby Fang Lunin on Mon Jun 06, 2005 2:21 am

A Quick Example to display the current...umm...howabout Hour and Minute time

Private Sub Timer1_Timer()
If Hour(Now) <= 12 Then
lblTime.Caption = Hour(Now) & ":" & Minute(Now) & " AM"
ElseIf Hour(Now) > 12 Then
lblTime.Caption = (Hour(Now) - 12) & ":" & Minute(Now) & " PM"
End If
End Sub
Fang Lunin
 
Posts: 9
Joined: Fri May 13, 2005 8:49 am

Postby dafunkymunky on Tue Jun 07, 2005 8:44 am

Welcome to DEVPPL gregbems

it would be better if you could say in what format do you get the date there are functions in vb to add dates i.e you could add certain no of days and calculate what the resulting day and month would be

this link would help you a lot in understanding about the inbuilt functions not only date but everything

http://www.int.gu.edu.au/courses/3008in ... Syntax.htm

if you want to read only about dates this is it

http://www.int.gu.edu.au/courses/3008in ... #Heading31

you will get everything about dates here
--------DAFUNKYMUNKY--------
::THE::NECESSARY::[D]EVIL::
....errr i mean munky....
User avatar
dafunkymunky
100+ Club
 
Posts: 183
Joined: Fri Apr 08, 2005 7:32 am
Location: India


Who is online

Users browsing this forum: No registered users and 4 guests