Question : msgbox if

Hello all,

I have a macro that put the date and time in a format in Column J and K.

__________________________________________________________________

 Dim oTime As Date
   oTime = DTPicker1.Value

Unload Me
ActiveCell.Value = Format$(oTime, "yyyymmdd") & ComboBox1 & ComboBox2

__________________________________________________________________

Now what i want to do is that if a have selected column J cell and there is no value in column K, it will add the result. But if there was a value in column K, if the value the will go in column J is higher than the value in column K of the same row, it will says "Date not good".

Now after, if you enter a value in column K and there was no value in column J, it will add the value to column K. But is there was a value in column J and that the new value that you put in column K is equal or lower that value in column J, it will says "Date not good".

How can i do this with a format "yyyymmddhhmm" ?

Thanks

Answer : msgbox if

What are you trying to do? Return an xml dataset based on your stored procedure from your service? Then it's as simple as this:

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
    [WebMethod]
    public DataSet GetSPData() {
        SqlConnection con;
        SqlCommand cmd;
        SqlDataAdapter adpt;
        DataSet ds = new DataSet();
        string SP = "certifica.ObtenerCodigoCurso";
        con = new SqlConnection(ConfigurationManager.ConnectionStrings["YourConnectionString"].ConnectionString);
        cmd = new SqlCommand(SP, con);
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.Parameters.Add("@abreviatura ", SqlDbType.NVarChar, 10).Value = "PARAMVALUE";
        adpt = new SqlDataAdapter(cmd);
        con.Open();
        adpt.Fill(ds);
        con.Close();
        return ds;
}
Random Solutions  
 
programming4us programming4us