Normal Topic Wrong date format (Read 409 times)
drastixnz
Full Member
***
Offline


A Newbie....

Posts: 146
Location: New Zealand
Joined: Nov 29th, 2006
Wrong date format
Aug 27th, 2007 at 1:28am
Print Post Print Post  
Hi guys,
    I have this following code it work fine except for one thing the date reads 2007/08/27

I however want it to read like, 27/08/2007

I have checked everywhere i can for the format of the date, but it wont work. so I am thinking it could be within the calender command.

@Calander command anyway have a look at the code.


var CallbackTemp as String

CallbackTemp = @PopupMenu("User-selected date;Today;Tomorrow;Next weekday; 5 days;10 days;14 days;20 days;A - Monday;B - Tuesday;C - Wednesday;D - Thursday;E - Friday;F - Saturday;G - Sunday", "SELECT FOLLOW-UP DATE");

If @Instr(CallbackTemp, "-") = 3 Then
{
CallbackTemp = @Del(CallbackTemp, 1, 4);
If @Dow$(@Date + 1) = CallbackTemp Then Date Client Requested = @Date + 1
Else If @Dow$(@Date + 2) = CallbackTemp Then Date Client Requested = @Date + 2
Else If @Dow$(@Date + 3) = CallbackTemp Then Date Client Requested = @Date + 3
Else If @Dow$(@Date + 4) = CallbackTemp Then Date Client Requested = @Date + 4
Else If @Dow$(@Date + 5) = CallbackTemp Then Date Client Requested = @Date + 5
Else If @Dow$(@Date + 6) = CallbackTemp Then Date Client Requested = @Date + 6
Else If @Dow$(@Date + 7) = CallbackTemp Then Date Client Requested = @Date + 7
CNext
}

If CallbackTemp = "Today" Then
{
Date Client Requested = @Date
CNext
}

If CallbackTemp = "Tomorrow" Then
{
Date Client Requested = @Date + 1;
CNext
}

If CallbackTemp = "Next weekday" Then
{
If @Dow$(@Date) = "Friday" Then
Date Client Requested = @Date + 3
Else If @Dow$(@Date) = "Saturday"
Then Date Client Requested = @Date + 2
Else Date Client Requested = @Date + 1
CNext
}

If CallbackTemp = "User-selected date" Then
{
Date Client Requested = @Calendar(@Year(@Date) + "/01/01","Select Follow-up Date")
}
Else If CallbackTemp <> "" Then
{
Date Client Requested = @Date + @Tn(@Num(CallbackTemp))
}



Thanks once again.
  
Back to top
IP Logged
 
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: Wrong date format
Reply #1 - Aug 27th, 2007 at 1:54am
Print Post Print Post  
In Sdesigner the property editor highlight the date field and choose format, then custom format.
  
Back to top
 
IP Logged
 
drastixnz
Full Member
***
Offline


A Newbie....

Posts: 146
Location: New Zealand
Joined: Nov 29th, 2006
Re: Wrong date format
Reply #2 - Aug 27th, 2007 at 2:24am
Print Post Print Post  
Opps, I had all of the fields right, but it was set to text instead of date.


Thanks for pointing me in the right direction
  
Back to top
IP Logged